// POST api/grupo public HttpResponseMessage Post([FromBody] GrupoProducto gp) { HttpResponseMessage response; try { GrupoService service = (GrupoService) new GrupoService().setDatabase(db); gp.FechaAlta = DateTime.Today; gp.UsuarioAlta = 1; gp.Estado = "A"; gp = service.saveOrUpdate(gp); response = this.getSuccessResponse(gp); } catch (Exception e) { response = this.getErrorResponse(e); } return(response); }