public IActionResult Update(int roomId, [FromBody] Room model) { if (model == null || roomId != model.Id || !ModelState.IsValid) { return(BadRequest()); } _repo.Update(model); return(CreatedAtAction("Update", model)); }