Beispiel #1
0
 public async Task <IActionResult> EditProgram(DietProgram data)
 {
     try
     {
         if (ModelState.IsValid)
         {
             _repository.UpdateProgram(data);
             return(RedirectToAction("Programs"));
         }
         return(View(data));
     }
     catch (Exception ex)
     {
         return(View("Error", ex));
     }
 }