View Code for Logic/MajorLogic.cs

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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QuantumConcepts.Common.Extensions;

namespace QuantumConcepts.CodeGenerator.Sample.Logic
{
    public static partial class MajorLogic
    {
        static partial void PerformPreDeleteLogic(DataAccess.SampleDataContext context, DataAccess.Major obj)
        {
            if (!obj.Students.IsNullOrEmpty())
                obj.Students.ForEach(o => StudentLogic.DeleteStudent(context, o.ID));
        }
    }
}