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