Ejemplo n.º 1
0
        public async Task <IHttpActionResult> UpdateAsync(RoomContract room)
        {
            try
            {
                await roomService.UpdateAsync(room.ToModel());

                return(Content(HttpStatusCode.Accepted, room.RoomId));
            }
            catch (KeyNotFoundException)
            {
                return(NotFound());
            }
        }
Ejemplo n.º 2
0
        public async Task <IHttpActionResult> AddAsync(RoomContract room)
        {
            await roomService.AddAsync(room.ToModel());

            return(Created(new Uri(Request.RequestUri, room.RoomId.ToString()), room.RoomId));
        }