Exemplo n.º 1
0
        /// <summary>
        /// 添加课时
        /// </summary>
        public void AddClassHour(string SectionID, ClassHour NewClassHour)
        {
            var SectionModel = sections.Where(vn => vn.ID == SectionID).FirstOrDefault()
                               ?? throw new CurriculumExecption("SectionID Not In Sections");

            if (IsFree)
            {
                NewClassHour.IsFree = IsFree;
            }
            NewClassHour.SectionID = SectionID;
            NewClassHour.section   = SectionModel;
            SectionModel.AddClassHour(NewClassHour);
            AddDomianEvent(new CreateClassHourDomainEvent(NewClassHour));
        }
Exemplo n.º 2
0
 public void AddClassHour(ClassHour hour)
 {
     ClassHours.Add(hour);
 }