public async Task <IActionResult> PutTCocinero([FromRoute] int id, [FromBody] TCocinero tCocinero) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != tCocinero.IdCocinero) { return(BadRequest()); } _context.Entry(tCocinero).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TCocineroExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutTDetalleFactura([FromRoute] long id, [FromBody] TDetalleFactura tDetalleFactura) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != tDetalleFactura.IdDetalleFactura) { return(BadRequest()); } _context.Entry(tDetalleFactura).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TDetalleFacturaExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }