Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Endereco endereco = dao.Buscar(id);

            dao.Deletar(endereco);
            return(RedirectToAction("Index"));
        }
        public IActionResult Deletar(Endereco endereco)
        {
            if (ModelState.IsValid)
            {
                _enderecoDao.Deletar(endereco);

                return(RedirectToAction("Index"));
            }
            else
            {
                return(View(endereco));
            }
        }