public async Task <IActionResult> PutTime(int id, Time time) { if (id != time.Id) { return(BadRequest()); } _context.Entry(time).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TimeExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutSpeedWall(int id, SpeedWall speedWall) { if (id != speedWall.Id) { return(BadRequest()); } _context.Entry(speedWall).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SpeedWallExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }