public IActionResult PutColores(int id, [FromBody] Colores color) { if (color.Id != id) { return(BadRequest()); } context.Entry(color).State = EntityState.Modified; context.SaveChanges(); return(new CreatedAtRouteResult("GetColor", new { id = color.Id }, color)); }
public IActionResult Put(int id, [FromBody] Operario operario) { if (operario.Id != id) { return(BadRequest()); } context.Entry(operario).State = EntityState.Modified; context.SaveChanges(); return(new CreatedAtRouteResult("GetOperario", new { id = operario.Id }, operario)); }