public async Task <IActionResult> PutRiesgo(int id, Riesgo riesgo) { if (id != riesgo.IdRiesgo) { return(BadRequest()); } _context.Entry(riesgo).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!RiesgoExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutCatalogoTecnico(int id, CatalogoTecnico catalogoTecnico) { if (id != catalogoTecnico.IdCatalogoTec) { return(BadRequest()); } _context.Entry(catalogoTecnico).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CatalogoTecnicoExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutModeloEntrega(int id, ModeloEntrega modeloEntrega) { if (id != modeloEntrega.IdModelo) { return(BadRequest()); } _context.Entry(modeloEntrega).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ModeloEntregaExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutProveedor(int id, Proveedor proveedor) { if (id != proveedor.IdProveedor) { return(BadRequest()); } _context.Entry(proveedor).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ProveedorExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutIncidente(int id, Incidente incidente) { if (id != incidente.IdIncidente) { return(BadRequest()); } _context.Entry(incidente).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!IncidenteExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }