private ExecutionBuilder(IDialect dialect, InternalDbContext policy, Expression executor) { this.Dialect = dialect; dbContext = policy; this.policy = policy; this.executor = executor; }
/// <summary> /// 初始化 <see cref="DefaultContextService"/> 类的新实例。 /// </summary> /// <param name="context"></param> /// <param name="databaseFactory">一个用于创建 <see cref="IDatabase"/> 的工厂函数。</param> public DefaultContextService(ContextServiceContext context) : base(context) { _databaseCreateor = () => CreateDatabase(context); QueryPolicy = new DefaultQueryPolicy(Provider); }
/// <summary> /// Adds policy to GuardianKernel. /// </summary> /// <param name="kernel">The kernel.</param> /// <param name="policy">The policy.</param> /// <returns></returns> public static GuardianKernel UsePolicy(this GuardianKernel kernel, IQueryPolicy policy) { kernel.QueryPolicies.Add(policy); return(kernel); }
public RelationshipIncluder(IQueryPolicy policy) { this.policy = policy; }
public static Expression Include(IQueryPolicy policy, Expression expression) { return(new RelationshipIncluder(policy).Visit(expression)); }
private RelationshipIncluder(IDbExpressionBuilder dbExpressionBuilder, InternalDbContext policy) { this.dbExpressionBuilder = dbExpressionBuilder; this.policy = policy; }
private ClientJoinedProjectionRewriter(InternalDbContext dbContext) { this.policy = dbContext; this.dbExpressionBuilder = dbContext.ExpressionBuilder; }
public bool Equals(IQueryPolicy other) { return other != null && this.Limit == other.Limit && this.DeferLoadComplexTypes == other.DeferLoadComplexTypes; }