Ejemplo n.º 1
0
        /// <summary>
        /// 创建当前类型查询表达式实列
        /// </summary>
        /// <returns></returns>
        public LambdaQuery <TModel> GetLambdaQuery()
        {
            //var dbContext2 = GetDbContext(true);//避开事务控制,使用新的连接
            var query = LambdaQueryFactory.CreateLambdaQuery <TModel>(DBExtend.dbContext);

            return(query);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 创建当前类型查询表达式实列
        /// </summary>
        /// <returns></returns>
        public LambdaQuery <TModel> GetLambdaQuery()
        {
            var dbContext2 = GetDbContext();//避开事务控制,使用新的连接
            var query      = LambdaQueryFactory.CreateLambdaQuery <TModel>(dbContext2);

            return(query);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 创建当前类型查询表达式实列
        /// </summary>
        /// <returns></returns>
        public virtual ILambdaQuery <T> GetLambdaQuery()
        {
            var db = DBExtend as AbsDBExtend;
            //var dbContext2 = GetDbContext(true);//避开事务控制,使用新的连接
            var query = LambdaQueryFactory.CreateLambdaQuery <T>(db.dbContext);

            return(query);
        }
Ejemplo n.º 4
0
        public static ILambdaQuery <T> GetLambdaQuery <T>(this DbContext dbContext) where T : class
        {
            var helper = getDBHelper(dbContext);
            var db     = new DbContextInner(helper, new DBLocation());
            var query  = LambdaQueryFactory.CreateLambdaQuery <T>(db);

            return(query);
        }