public async Task <IActionResult> Deleteconfirm(int?id) { if (id == null) { return(NotFound()); } await _repository.Delete(id.Value); return(RedirectToAction("Index")); }
public async Task <IActionResult> Delete(int id) { var Plato = await _repository.GetById(id); if (Plato == null) { return(NotFound()); } await _repository.Delete(id); return(NoContent()); }