public IActionResult Post([FromBody] GrupoDTO grupo)
 {
     if (!ModelState.IsValid)
     {
         throw new Exception("Model is not Valid");
     }
     service.Insert(grupo);
     return(Ok(true));
 }
Beispiel #2
0
        public ActionResult Salvar(Grupo g)
        {
            g.Responsavel = _usuarioService.GetUsuario(User.Identity.Name);
            _grupoService.Insert(g);

            return(View("Index", _grupoService.GetAllGrupo(g.Responsavel)));
        }
 public IActionResult Post([FromBody] GrupoDTO grupo)
 {
     Service.Insert(grupo);
     return(Ok(true));
 }