Esempio n. 1
0
 public IActionResult Create(CreateHolidayViewModel viewModel)
 {
     try
     {
         holidayService.Add(viewModel.Type, viewModel.Days, viewModel.Description);
         return(RedirectToAction("Index"));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }