public ActionResult CadastrarFGTS([FromBody] AddFGTSModel model) { try { FGTS fgts = model; this.empresaService.Cadastrar(fgts); return(Ok()); } catch (Exception ex) { MessageModel message = new MessageModel(1, ex.Message); return(BadRequest(message)); } }
public void Insert(FGTS fgts) { conexao.FGTS.Add(fgts); }
public void Cadastrar(FGTS fgts) { this.empresaContext.Insert(fgts); this.empresaContext.SaveChanges(); }