Same as the previous requirement

This commit is contained in:
sunkaixuan 2023-03-15 21:14:40 +08:00
parent da686c7c3f
commit b49cf524d8
2 changed files with 30 additions and 0 deletions

View File

@ -116,6 +116,31 @@ namespace SqlSugar
result.QueryBuilder.JoinQueryInfos.Add(GetJoinInfo(joinExpression, JoinType.Right));
return result;
}
public ISugarQueryable<T, T2, T3> LeftJoin<T3>(Expression<Func<T, T2, T3, bool>> joinExpression, string tableName)
{
var result= LeftJoin<T3>(joinExpression);
result.QueryBuilder.JoinQueryInfos.Last().TableName = tableName;
return result;
}
public ISugarQueryable<T, T2, T3> FullJoin<T3>(Expression<Func<T, T2, T3, bool>> joinExpression, string tableName)
{
var result = FullJoin<T3>(joinExpression);
result.QueryBuilder.JoinQueryInfos.Last().TableName = tableName;
return result;
}
public ISugarQueryable<T, T2, T3> InnerJoin<T3>(Expression<Func<T, T2, T3, bool>> joinExpression, string tableName)
{
var result = InnerJoin<T3>(joinExpression);
result.QueryBuilder.JoinQueryInfos.Last().TableName = tableName;
return result;
}
public ISugarQueryable<T, T2, T3> RightJoin<T3>(Expression<Func<T, T2, T3, bool>> joinExpression, string tableName)
{
var result = RightJoin<T3>(joinExpression);
result.QueryBuilder.JoinQueryInfos.Last().TableName = tableName;
return result;
}
public ISugarQueryable<T, T2, T3> InnerJoin<T3>(Expression<Func<T, T2, T3, bool>> joinExpression)
{
this.Context.InitMappingInfo<T3>();

View File

@ -253,6 +253,11 @@ namespace SqlSugar
ISugarQueryable<T, T2, T3> FullJoin<T3>(Expression<Func<T, T2, T3, bool>> joinExpression);
ISugarQueryable<T, T2, T3> InnerJoin<T3>(Expression<Func<T, T2, T3, bool>> joinExpression);
ISugarQueryable<T, T2, T3> RightJoin<T3>(Expression<Func<T, T2, T3, bool>> joinExpression);
ISugarQueryable<T, T2, T3> LeftJoin<T3>(Expression<Func<T, T2, T3, bool>> joinExpression,string tableName);
ISugarQueryable<T, T2, T3> FullJoin<T3>(Expression<Func<T, T2, T3, bool>> joinExpression,string tableName);
ISugarQueryable<T, T2, T3> InnerJoin<T3>(Expression<Func<T, T2, T3, bool>> joinExpression,string tableName);
ISugarQueryable<T, T2, T3> RightJoin<T3>(Expression<Func<T, T2, T3, bool>> joinExpression,string tableName);
#region Where
new ISugarQueryable<T, T2> Where(Expression<Func<T, bool>> expression);
ISugarQueryable<T, T2> Where(Expression<Func<T, T2, bool>> expression);