From eb4acefa6035f28b5d9c7452fa56bff3bde8a6bc Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Wed, 15 Mar 2023 22:06:43 +0800 Subject: [PATCH] Same logic as above --- .../QueryableProvider06-10.cs | 26 +++++++++++++++++++ Src/Asp.Net/SqlSugar/Interface/IQueryable.cs | 4 +++ 2 files changed, 30 insertions(+) diff --git a/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider06-10.cs b/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider06-10.cs index 864ffb3d7..ecec93fae 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider06-10.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider06-10.cs @@ -2047,6 +2047,32 @@ namespace SqlSugar result.QueryBuilder.JoinQueryInfos.Add(GetJoinInfo(joinExpression, JoinType.Inner)); return result; } + + public ISugarQueryable LeftJoin(Expression> joinExpression, string tableName) + { + var result = LeftJoin(joinExpression); + result.QueryBuilder.JoinQueryInfos.Last().TableName = tableName; + return result; + } + public ISugarQueryable FullJoin(Expression> joinExpression, string tableName) + { + var result = FullJoin(joinExpression); + result.QueryBuilder.JoinQueryInfos.Last().TableName = tableName; + return result; + } + public ISugarQueryable InnerJoin(Expression> joinExpression, string tableName) + { + var result = InnerJoin(joinExpression); + result.QueryBuilder.JoinQueryInfos.Last().TableName = tableName; + return result; + } + public ISugarQueryable RightJoin(Expression> joinExpression, string tableName) + { + var result = RightJoin(joinExpression); + result.QueryBuilder.JoinQueryInfos.Last().TableName = tableName; + return result; + } + #region Where public new ISugarQueryable Where(Expression> expression) { diff --git a/Src/Asp.Net/SqlSugar/Interface/IQueryable.cs b/Src/Asp.Net/SqlSugar/Interface/IQueryable.cs index 070c33fba..cee00ea43 100644 --- a/Src/Asp.Net/SqlSugar/Interface/IQueryable.cs +++ b/Src/Asp.Net/SqlSugar/Interface/IQueryable.cs @@ -1161,6 +1161,10 @@ namespace SqlSugar ISugarQueryable FullJoin(Expression> joinExpression); ISugarQueryable InnerJoin(Expression> joinExpression); ISugarQueryable RightJoin(Expression> joinExpression); + ISugarQueryable LeftJoin(Expression> joinExpression,string tableName); + ISugarQueryable FullJoin(Expression> joinExpression,string tableName); + ISugarQueryable InnerJoin(Expression> joinExpression,string tableName); + ISugarQueryable RightJoin(Expression> joinExpression,string tableName); #region Where new ISugarQueryable Where(Expression> expression);