Example #1
0
 public IActionResult Cadastrar(RestricaoProfessor restricao)
 {
     if (ModelState.IsValid)
     {
         persistenciaRestricaoProfessor.Adiconar(restricao);
         return(RedirectToAction(nameof(Index)));
     }
     return(View(restricao));
 }
Example #2
0
 public void Adiconar(RestricaoProfessor restricao)
 {
     _contexto.RestricoesProfessores.Add(restricao);
     _contexto.SaveChanges();
 }