예제 #1
0
파일: SearchT.cs 프로젝트: yswenli/WEF
 /// <summary>
 /// Inner Join。Lambda写法:.InnerJoin&lt;Model2>((a, b) => a.ID == b.ID)
 /// </summary>
 /// <typeparam name="TEntity"></typeparam>
 /// <param name="lambdaWhere"></param>
 /// <param name="asName"></param>
 /// <returns></returns>
 public Search <T> InnerJoin <TEntity>(Expression <Func <T, TEntity, bool> > lambdaWhere, string asName = "")
     where TEntity : Entity
 {
     return(Join(EntityCache.GetTableName <TEntity>(), EntityCache.GetUserName <TEntity>(), ExpressionToOperation <T> .ToJoinWhere(_tableName, lambdaWhere), JoinType.InnerJoin));
 }
예제 #2
0
 /// <summary>
 /// Left Join。Lambda写法:.LeftJoin&lt;Model2>((d1,d2) => d1.ID == d2.ID)
 /// </summary>
 /// <typeparam name="TEntity"></typeparam>
 /// <param name="lambdaWhere"></param>
 /// <returns></returns>
 public Search <T> LeftJoin <TEntity>(Expression <Func <T, TEntity, bool> > lambdaWhere)
     where TEntity : Entity
 {
     return(Join(EntityCache.GetTableName <TEntity>(), EntityCache.GetUserName <TEntity>(), ExpressionToOperation <T> .ToJoinWhere(lambdaWhere), JoinType.LeftJoin));
 }