public async Task <IActionResult> PutSpaceSize(int id, SpaceSize spaceSize) { if (id != spaceSize.Id) { return(BadRequest()); } _context.Entry(spaceSize).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SpaceSizeExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutOrder(int id, Order order) { if (id != order.Id) { return(BadRequest()); } _context.Entry(order).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!OrderExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutCleaningPackage(int id, CleaningPackage cleaningPackage) { if (id != cleaningPackage.Id) { return(BadRequest()); } _context.Entry(cleaningPackage).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CleaningPackageExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }