Beispiel #1
0
 public IActionResult Post(restaurante data)
 {
     try
     {
         _restauranteService.Save(data);
         return(Ok());
     }
     catch (Exception ex)
     {
         return(StatusCode(500, ex.Message));
     }
 }
Beispiel #2
0
 public ActionResult Delete(int id)
 {
     restauranteService.Delete(x => x.Id == id);
     restauranteService.Save();
     return(RedirectToAction("Index"));
 }