View Code for Logic/StudentLogic.cs

Source code for the file Logic/StudentLogic.cs is shown below.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QuantumConcepts.CodeGenerator.Sample.DataAccess;
using QuantumConcepts.Common.Extensions;

namespace QuantumConcepts.CodeGenerator.Sample.Logic
{
    public static partial class StudentLogic
    {
        static partial void PerformPreDeleteLogic(SampleDataContext context, Student obj)
        {
            if (!obj.Enrollments.IsNullOrEmpty())
                obj.Enrollments.ForEach(o => EnrollmentLogic.DeleteEnrollment(context, o.ID));
        }
    }
}