public ActionResult Delete(String CPF_CGC, Cadastro cadastro) { try { CadastroRepository cadastroRepository = new CadastroRepository(); cadastroRepository.Delete(cadastro); return(RedirectToAction("Index")); } catch { return(View()); } }
public IActionResult Delete(int id) { _repository.Delete(id); return(RedirectToAction("Index")); }