public MongoSet(MongoContext context, String name) { Context = context; Database = context.Database; CollectionGeneric = Database.GetCollection <T>(name); //Queryable = CollectionGeneric.AsQueryable(); Query = InterceptingProvider.Intercept(this.CollectionGeneric.AsQueryable(), this.Context); Loaded = new List <T>(); }
public InterceptedQuery( InterceptingProvider provider, Expression expression, MongoContext context) { this._provider = provider; this._expression = expression; this._context = context; }
private static IQueryable <T> Intercept <T>( IQueryable <T> underlyingQuery, MongoContext context, params Func <Expression, Expression>[] visitors) { InterceptingProvider provider = new InterceptingProvider( underlyingQuery.Provider, context, visitors ); return(provider.CreateQuery <T>( underlyingQuery.Expression)); }