/// <summary>
        /// Change the result type for the query provider
        /// </summary>
        public IRavenQueryProvider For <TS>()
        {
            if (typeof(T) == typeof(TS))
            {
                return(this);
            }

            var ravenQueryProvider =
                new RavenQueryProvider <TS>(_queryGenerator, _indexName, _collectionName, OriginalQueryType, _queryStatistics, _highlightings, _isMapReduce);

            ravenQueryProvider.Customize(_customizeQuery);

            return(ravenQueryProvider);
        }
Exemple #2
0
        /// <summary>
        /// Change the result type for the query provider
        /// </summary>
        public IRavenQueryProvider For <TS>()
        {
            if (typeof(T) == typeof(TS))
            {
                return(this);
            }

            var ravenQueryProvider = new RavenQueryProvider <TS>(_queryGenerator, _indexName, _collectionName, OriginalQueryType, _queryStatistics, _highlightings, _isMapReduce)
            {
                ResultTransformer = ResultTransformer
            };

            ravenQueryProvider.Customize(_customizeQuery);
            foreach (var transformerParam in _transformerParameters)
            {
                ravenQueryProvider.AddTransformerParameter(transformerParam.Key, transformerParam.Value);
            }
            return(ravenQueryProvider);
        }