public ActionResult <IEnumerable <ResRestaurantDTO> > GetReservationNotPay(int userId)       //this method is not used to this preview
        {
            var getResNotPayByIdCommand = CommandFactory.GetResRestaurantNotPayByIdCommand(userId);

            try {
                Console.WriteLine(userId);
                //return ResRestaurantRepository.getReservationNotPay(userId);
                getResNotPayByIdCommand.Execute();

                ResRestaurantMapper resRestMapper = MapperFactory.createResRestaurantMapper();
                return(resRestMapper.CreateDTOList(getResNotPayByIdCommand.GetResult()));
            }
            catch (DatabaseException) {
                return(StatusCode(500));
            }
            catch (InvalidStoredProcedureSignatureException) {
                return(StatusCode(500));
            }
        }
        public ActionResult <IEnumerable <ResRestaurantDTO> > Get(int id)
        {
            var getByIdCommand = CommandFactory.GetResRestaurantByIdCommand(id);

            try {
                Console.WriteLine(id);
                //return ResRestaurantRepository.getResRestaurant(id);
                getByIdCommand.Execute();
                //return getByIdCommand.GetResult();
                ResRestaurantMapper resRestMapper = MapperFactory.createResRestaurantMapper();
                return(resRestMapper.CreateDTOList(getByIdCommand.GetResult()));
            }
            catch (DatabaseException) {
                return(StatusCode(500));
            }
            catch (InvalidStoredProcedureSignatureException) {
                return(StatusCode(500));
            }
        }