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