public async Task <IActionResult> PutCarType(int id, CarType carType) { if (id != carType.CarTypeID) { return(BadRequest()); } _context.Entry(carType).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CarTypeExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutOT(int id, OT oT) { if (id != oT.OTID) { return(BadRequest()); } _context.Entry(oT).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!OTExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutFoodSet(int id, FoodSet foodSet) { if (id != foodSet.FoodSetID) { return(BadRequest()); } _context.Entry(foodSet).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FoodSetExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }