Ejemplo n.º 1
0
 public JsonResult AddMenu(MenuViewModel model)
 {
     try
     {
         _restaurantManagement.AddMenu(model.MapToBusinessModel());
         return(Json(new { success = true }));
     }
     catch (Exception ex)
     {
         _logger.LogError(ex);
         return(Json(new { success = false, message = ex.Message }));
     }
 }
Ejemplo n.º 2
0
 public ActionResult Create(MenuViewModel model)
 {
     try
     {
         _restaurantManagement.AddMenu(model.MapToBusinessModel());
     }
     catch (Exception ex)
     {
         _logger.LogError(ex);
         throw;
     }
     return(RedirectToAction("Index"));
 }