Exemple #1
0
 /// <summary>
 ///查询-多表查询
 /// </summary>
 /// <typeparam name="T1">实体1</typeparam>
 /// <typeparam name="T2">实体2</typeparam>
 /// <typeparam name="TResult">返回对象</typeparam>
 /// <param name="joinExpression">关联表达式 (join1,join2) => new object[] {JoinType.Left,join1.UserNo==join2.UserNo}</param>
 /// <param name="selectExpression">返回表达式 (s1, s2) => new { Id =s1.UserNo, Id1 = s2.UserNo}</param>
 /// <param name="whereLambda">查询表达式 (w1, w2) =>w1.UserNo == "")</param>
 /// <returns>值</returns>
 public async Task <List <TResult> > QueryMuch <T1, T2, TResult>(
     Expression <Func <T1, T2, object[]> > joinExpression,
     Expression <Func <T1, T2, TResult> > selectExpression,
     Expression <Func <T1, T2, bool> > whereLambda = null) where T1 : class, new()
 {
     return(await BaseDal.QueryMuch(joinExpression, selectExpression, whereLambda));
 }