/// <summary>
        /// Creates a new reservation and saves it to the database
        /// </summary>
        /// <param name="request">Create reservation DTO</param>
        /// <returns>The newly created reserrvation DTO</returns>
        public Dto.ReservationResult AddNewReservation(Dto.ReservationRequest request)
        {
            if (request == null)
            {
                throw new ArgumentNullException("request");
            }

            return(Call(() =>
            {
                //creates a new reservation entity
                var reservation = ReservationFactory.CreateReservation(request.Name, request.ReservationDateTime, request.GuestsCount, request.UserId);

                var entityValidator = EntityValidatorLocator.CreateValidator();
                if (entityValidator.IsValid(reservation))
                {
                    using (var transaction = _reservationRepository.BeginTransaction())
                    {
                        _reservationRepository.Add(reservation);
                        transaction.Commit();
                    }
                }
                else
                {
                    return new Dto.ReservationResult
                    {
                        Status = ActionResultCode.Errored,
                        Message = Messages.validation_errors,
                        Errors = entityValidator.GetInvalidMessages(reservation)
                    };
                }

                //returns success
                return reservation.ProjectedAs <Dto.ReservationResult>();
            }));
        }