Ejemplo n.º 1
0
        public GroupShedule Create(GroupSheduleModel groupSheduleModel)
        {
            GroupShedule groupShedule = _groupShedule.Find(g => g.GroupId == groupSheduleModel.GroupId).FirstOrDefault();
            GroupShedule shedule      = new GroupShedule();

            shedule.GroupId         = groupSheduleModel.GroupId;
            shedule.sheduleDeatails = groupSheduleModel.sheduleDeatails;
            if (groupShedule == null)
            {
                _groupShedule.InsertOne(shedule);
                return(shedule);
            }
            _groupShedule.DeleteOne(g => g.Id == groupShedule.Id);
            _groupShedule.InsertOne(shedule);
            return(shedule);
        }
Ejemplo n.º 2
0
 public IActionResult Create(GroupSheduleModel groupSheduleModel)
 {
     return(Ok(_scheduleService.Create(groupSheduleModel)));
 }