Exemple #1
0
        /// <summary>
        /// 在当前关联基础上再创建关联
        /// </summary>
        /// <typeparam name="T4"></typeparam>
        /// <param name="expression"></param>
        /// <param name="joinType"></param>
        /// <returns></returns>
        public LambdaQueryJoin <T, T2, T3, T4> Join <T4>(Expression <Func <T, T2, T3, T4, bool> > expression, JoinType joinType = JoinType.Inner)
        {
            var query2 = new LambdaQueryJoin <T, T2, T3, T4>(BaseQuery);

            BaseQuery.__Join <T4>(expression.Body, joinType);
            return(query2);
        }
Exemple #2
0
        /// <summary>
        /// 在当前关联基础上再创建关联
        /// </summary>
        /// <typeparam name="T3">再关联的类型</typeparam>
        /// <param name="expression">关联语法</param>
        /// <param name="joinType">关联类型</param>
        /// <returns></returns>
        public LambdaQueryJoin <T, T2, T3> Join <T3>(Expression <Func <T, T2, T3, bool> > expression, JoinType joinType = JoinType.Inner)
        {
            //like
            //query.Join<Code.Member>((a, b) => a.UserId == b.Id)
            //    .Select((a, b) => new { a.BarCode, b.Name })
            //    .Join<Code.Order>((a, b) => a.Id == b.Id);
            var query2 = new LambdaQueryJoin <T, T2, T3>(BaseQuery);

            BaseQuery.__Join <T3>(expression.Body, joinType);
            return(query2);
        }