Synchronization code

This commit is contained in:
sunkaixuan
2023-09-11 13:47:07 +08:00
parent c62d7cf059
commit 251c869942
2 changed files with 17 additions and 1 deletions

View File

@@ -571,7 +571,22 @@ namespace SqlSugar
QueryBuilder.Parameters.Add(parameter);
return this;
}
public ISugarQueryable<T> AddJoinInfo(Type JoinType, string shortName, string joinWhere, JoinType type = JoinType.Left)
{
var tableName = this.Context.EntityMaintenance.GetEntityInfo(JoinType).DbTableName;
QueryBuilder.JoinIndex = +1;
QueryBuilder.JoinQueryInfos
.Add(new JoinQueryInfo()
{
JoinIndex = QueryBuilder.JoinIndex,
TableName = tableName,
ShortName = shortName,
JoinType = type,
JoinWhere = joinWhere,
EntityType=JoinType
});
return this;
}
public virtual ISugarQueryable<T> AddJoinInfo(string tableName, string shortName, string joinWhere, JoinType type = JoinType.Left)
{