mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-03 20:27:56 +08:00
db.Queryable.AddJoinInfo(+3)
This commit is contained in:
parent
426c4b2003
commit
dd10f26612
@ -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)
|
||||
{
|
||||
|
||||
|
@ -62,6 +62,7 @@ namespace SqlSugar
|
||||
ISugarQueryable<T> AddParameters(SugarParameter[] parameters);
|
||||
ISugarQueryable<T> AddParameters(List<SugarParameter> parameters);
|
||||
ISugarQueryable<T> AddJoinInfo(string tableName, string shortName, string joinWhere, JoinType type = JoinType.Left);
|
||||
ISugarQueryable<T> AddJoinInfo(Type JoinType, string shortName, string joinWhere, JoinType type = JoinType.Left);
|
||||
|
||||
/// <summary>
|
||||
/// if a property that is not empty is a condition
|
||||
|
Loading…
Reference in New Issue
Block a user