public static IQueryStrategy OnCondition(this QueryStrategy queryStrategy, bool condition)
        {
            Check.NotNull(queryStrategy, "queryStrategy");

            if (condition)
            {
                return(queryStrategy);
            }

            var defaultQueryStrategy = new DefaultQueryStrategy();

            defaultQueryStrategy.QueryableRepository = queryStrategy.QueryableRepository;
            return(defaultQueryStrategy);
        }
        public override IQueryable <T> GetQueryableEntities <T>(object additionalQueryData)
        {
            if (!RunStrategy)
            {
                var emptyStrategy = new DefaultQueryStrategy();
                emptyStrategy.QueryableRepository = this.QueryableRepository;
                return(emptyStrategy.GetQueryableEntities <T>(additionalQueryData));
            }

            if (QueryStrategiesFunctions != null)
            {
                QueryStrategies = QueryStrategiesFunctions.Select(p => p());
            }

            AddRange(QueryStrategies);

            QueryableRepository = this.QueryableRepository;
            return(base.GetQueryableEntities <T>(additionalQueryData));
        }