mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-15 18:55:07 +08:00
Update exp to sql (SqlFunc.Exists)
This commit is contained in:
@@ -1035,7 +1035,14 @@ namespace SqlSugar
|
||||
List<IConditionalModel> conditionalModels = (List<IConditionalModel>) model.Args[1].MemberValue;
|
||||
var sqlObj = this.Context.SugarContext.Context.Queryable<object>().SqlBuilder.ConditionalModelToSql(conditionalModels, 0);
|
||||
model.Args[1].MemberName = sqlObj.Key;
|
||||
this.Context.Parameters.AddRange(sqlObj.Value);
|
||||
if (sqlObj.Value != null)
|
||||
{
|
||||
this.Context.Parameters.AddRange(sqlObj.Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
return " 1=1 ";
|
||||
}
|
||||
}
|
||||
return this.Context.DbMehtods.Exists(model);
|
||||
|
||||
|
Reference in New Issue
Block a user