public ActionResult Create(Estudante estudante) { try { if (ModelState.IsValid) { _estudanteRepositorio.InserirEstudante(estudante); _estudanteRepositorio.Salvar(); return(RedirectToAction("Index")); } } catch (DataException) { ModelState.AddModelError("", "Não foi possível salvar as mudanças. Tente novamente...."); } return(View(estudante)); }