public async Task <IActionResult> PutVol(int id, Vol vol) { if (id != vol.VolId) { return(BadRequest()); } _context.Entry(vol).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!VolExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutBagage(int id, Bagage bagage) { if (id != bagage.BagageId) { return(BadRequest()); } _context.Entry(bagage).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!BagageExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutFlight(int id, Flight flight) { if (id != flight.FLIGHTID) { return(BadRequest()); } _context.Entry(flight).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FlightExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }