public async Task <IHttpActionResult> UpdateAsync(ReservationContract reservation) { try { await reservationService.UpdateAsync(reservation.ToModel()); return(Content(HttpStatusCode.Accepted, reservation.ReservationId)); } catch (KeyNotFoundException) { return(NotFound()); } }
public async Task <IHttpActionResult> AddAsync(ReservationContract reservation) { await reservationService.AddAsync(reservation.ToModel()); return(Created(new Uri(Request.RequestUri, reservation.ReservationId.ToString()), reservation.ReservationId)); }