Esempio n. 1
0
 public void AddTemplateScheduleToDb(TemplateSchedule templateSchedule)
 {
     if (ValidateTemplateSchedule(templateSchedule))
     {
         using (TransactionScope scope = new TransactionScope())
         {
             templateSchedule.Id = _templateScheduleRepository.AddTemplateScheduleToDatabase(templateSchedule);
             _templateShiftController.AddTemplateShiftsFromTemplateSchedule(templateSchedule.Id, templateSchedule.TemplateShifts);
             scope.Complete();
         }
     }
     else
     {
         throw new ArgumentException();
     }
 }