public async Task <IActionResult> PutHouse(long id, House house) { if (id != house.Id) { return(BadRequest()); } _context.Entry(house).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!HouseExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }