/// <summary> /// Inner Join。Lambda写法:.InnerJoin<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)); }
/// <summary> /// Left Join。Lambda写法:.LeftJoin<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)); }