/// <summary> /// 初始化 <see cref="DbExpressionVisitor"/> 类的新实例 /// </summary> /// <param name="ag">表别名解析器</param> /// <param name="builder">SQL 语句生成器</param> public DbExpressionVisitor(AliasGenerator ag, ISqlBuilder builder) { _ag = ag; _builder = builder; _provider = (DbQueryProvider)_builder.Provider; _visitedStack = new MemberVisitedStack(); }
/// <summary> /// 初始化 <see cref="DbContextBase"/> 类的新实例 /// <param name="connString">数据库连接字符串</param> /// <param name="commandTimeout">执行命令超时时间</param> /// </summary> public DbContextBase(string connString, int?commandTimeout) { XFrameworkException.Check.NotNull(connString, nameof(connString)); _connString = connString; _commandTimeout = commandTimeout; _isDebug = false; _isolationLevel = null; _provider = (DbQueryProvider)this.Provider; }
/// <summary> /// 实例化 <see cref="TranslateContext"/> 类的新实例 /// </summary> /// <param name="context">当前查询上下文</param> public TranslateContext(IDbContext context) { XFrameworkException.Check.NotNull(context, nameof(context)); _context = context; _provider = (DbQueryProvider)_context.Provider; }