public WrappedQueryableProvider(System.Linq.IQueryProvider queryProvider) { if (queryProvider == null) { throw new ArgumentNullException(nameof(queryProvider)); } InnerQueryProvider = queryProvider; }
public QueryProvider(System.Linq.IQueryProvider sourceprovider) { SourceProvider = sourceprovider; Factory = (provider, type, expr) => (IQueryable)Activator.CreateInstance( typeof(Queryable <>).MakeGenericType(type), this, expr); }
private static ProviderType GetProviderType(this System.Linq.IQueryProvider provider) { if (Providers.TryGetValue(provider.GetType().Namespace, out var providerType)) { return(providerType); } else { return(ProviderType.Unsupported); } }
private static IQueryableAsyncExecutor GetProviderExecutor(System.Linq.IQueryProvider provider) { if (Providers.TryGetValue(provider.GetType().Namespace, out var providerType)) { if (providerType == ProviderType.LinqToDB) { return(new LinqToDBQueryableAsyncExecutor()); } else { return(null); } } else { return(null); } }
public QueryProvider(System.Linq.IQueryProvider sourceprovider, Func <IQueryProvider, Type, Expression, IQueryable> factory) { SourceProvider = sourceprovider; Factory = factory; }