Exemplo n.º 1
0
        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));
        }