public async Task <IHttpActionResult> Post([FromBody] ReservationDto value) { var user = _authRepository.FindUserByUsername(value.Username); var reservation = Mapper.Map <ReservationDto, Reservation>(value); reservation.UserId = user.Id; if (!_reservationsService.BookReservation(reservation)) { return(Conflict()); } return(Created(Request.RequestUri.ToString(), reservation)); }