public static TeamColaboradores MapModel(this TeamColaboradoresSave x) { var result = new TeamColaboradores() { Codigo = x.TeamCodigo, Col_I_Codigo = x.ColaboradorCodigo, Estado = x.Estado, Fecha = x.Fecha, }; return(result); }
public OperationResult <TeamColaboradores> SaveTeamColabodaroes(TeamColaboradores team) { var result = new OperationResult <TeamColaboradores>(); try { _utilServices.TeamColaboradores.Add(team); _utilServices.SaveChanges(); result.Success = true; result.ResultObject = team; } catch (Exception ex) { _utilServices.Errores.Add(ex.SaveModel()); _utilServices.SaveChanges(); throw ex.InnerException; } return(result); }
public OperationResult <TeamColaboradores> Post([FromBody] TeamColaboradores model) => _utilServices.SaveTeamColabodaroes(model);