Пример #1
0
        /// <summary>
        /// Gets the typed query root for resource set.
        /// </summary>
        /// <typeparam name="TElement">The type of the element.</typeparam>
        /// <param name="resourceSet">The resource set.</param>
        /// <returns></returns>
        private System.Linq.IQueryable GetTypedQueryRootForResourceSet <TElement>(ResourceSet resourceSet)
        {
            Query <TElement>        sourceQuery   = new Query <TElement>(this.dataSource.Provider);
            DSPIQALinqQueryProvider queryProvider = new DSPIQALinqQueryProvider(this.dataSource, sourceQuery.Provider, resourceSet);

            return(queryProvider.CreateQuery(sourceQuery.Expression).AsQueryable());
        }
        /// <summary>
        /// Creates the query.
        /// </summary>
        /// <param name="underlyingQuery">The underlying query.</param>
        /// <returns></returns>
        public static IQueryable CreateQuery(IQueryable underlyingQuery)
        {
            DSPIQALinqQueryProvider provider = new DSPIQALinqQueryProvider(underlyingQuery.Provider);

            return(provider.CreateQuery(underlyingQuery.Expression));
        }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DSPIQALinqQuery&lt;T&gt;"/> class.
 /// </summary>
 /// <param name="queryProvider">The query provider.</param>
 /// <param name="queryExpression">The query expression.</param>
 internal DSPIQALinqQuery(DSPIQALinqQueryProvider queryProvider, Expression queryExpression)
 {
     this.queryProvider   = queryProvider;
     this.queryExpression = queryExpression;
 }