View Code for Logic/SemesterLogic.cs

Source code for the file Logic/SemesterLogic.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 SemesterLogic
    {
        static partial void PerformPreDeleteLogic(DataAccess.SampleDataContext context, DataAccess.Semester obj)
        {
            if (!obj.Courses.IsNullOrEmpty())
                obj.Courses.ForEach(o => CourseLogic.DeleteCourse(context, o.ID));
        }
    }
}