Ejemplo n.º 1
0
 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>();
 }
Ejemplo n.º 2
0
 public InterceptedQuery(
     InterceptingProvider provider,
     Expression expression,
     MongoContext context)
 {
     this._provider   = provider;
     this._expression = expression;
     this._context    = context;
 }
Ejemplo n.º 3
0
        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));
        }