public IHttpActionResult Put(Room room) { var roomToUpdate = _roomService.GetById(room.Id); if (roomToUpdate == null) { return NotFound(); } roomToUpdate.Name = room.Name; _roomService.Update(roomToUpdate); return Ok(roomToUpdate); }
public IHttpActionResult Post(Room room) { return Ok(_roomService.Add(room)); }