public ActionResult CreateScheduler(SchedulerViewModel model) { if (!ModelState.IsValid) { return(View(model)); } var dto = model.ToDto(); var vm = SchedulerViewModel.Create(dto); SchedulerRepository.Create(model.ToDto()); return(RedirectToAction("scheduler-manager")); }
public ActionResult EditScheduler(SchedulerViewModel model) { if (!ModelState.IsValid) { return(View(model)); } SchedulerRepository.Update(model.ToDto()); return(RedirectToAction("scheduler-manager")); }