public ActionResult Delete(String CPF_CGC, Cadastro cadastro)
        {
            try
            {
                CadastroRepository cadastroRepository = new CadastroRepository();
                cadastroRepository.Delete(cadastro);

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }
예제 #2
0
 public IActionResult Delete(int id)
 {
     _repository.Delete(id);
     return(RedirectToAction("Index"));
 }