public ActionResult Delete(int id) { if (_repository.Buscar(id) == null) { return(NotFound()); } _repository.Remover(id); _repository.Salvar(); return(NoContent()); }
public ActionResult Delete(int id, Tipo collection) { try { // TODO: Add delete logic here _tipoRepository.Remover(collection); return(RedirectToAction(nameof(Index))); } catch { return(View()); } }
public void Remover(Tipo entity) { _tipoRepository.Remover(entity); }