Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            AlunoViewModel aluno = appService.ObterAlunoPorId(id);

            appService.DeletarAluno(aluno);
            return(RedirectToAction("Index"));
        }
Example #2
0
        public IActionResult Deletar(int id)
        {
            _alunoAppService.DeletarAluno(id);

            TempData["MSG_SUCESSO"] = "Aluno deletado com sucesso!";

            return(RedirectToAction(nameof(Aluno)));
        }
Example #3
0
        public ActionResult DeletarAlunoConfirmacao(Guid id)
        {
            var aluno = _alunoappservice.BuscarAlunoPorId(id);

            _alunoappservice.DeletarAluno(id);

            string url = Url.Action("Index", "Home");

            return(Json(new { success = true, url = url }));
        }