mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-20 10:44:05 +08:00
Synchronization code
This commit is contained in:
@@ -278,18 +278,22 @@ namespace SqlSugar
|
||||
result.Where(sql.Key, sql.Value);
|
||||
return result;
|
||||
}
|
||||
|
||||
public IDeleteable<T> WhereColumns(T data, Expression<Func<T, object>> columns)
|
||||
{
|
||||
return WhereColumns(new List<T>() { data },columns);
|
||||
}
|
||||
public IDeleteable<T> WhereColumns(List<T> list,Expression<Func<T, object>> columns)
|
||||
{
|
||||
if (this.GetPrimaryKeys().IsNullOrEmpty())
|
||||
{
|
||||
tempPrimaryKeys = DeleteBuilder.GetExpressionValue(columns, ResolveExpressType.ArraySingle).GetResultArray().Select(it => this.SqlBuilder.GetNoTranslationColumnName(it)).ToList();
|
||||
}
|
||||
this.Where(list);
|
||||
if (columns != null&& tempPrimaryKeys.IsNullOrEmpty())
|
||||
else if (columns != null && tempPrimaryKeys.IsNullOrEmpty())
|
||||
{
|
||||
tempPrimaryKeys = DeleteBuilder.GetExpressionValue(columns, ResolveExpressType.ArraySingle).GetResultArray().Select(it => this.SqlBuilder.GetNoTranslationColumnName(it)).ToList();
|
||||
}
|
||||
this.Where(list);
|
||||
|
||||
return this;
|
||||
}
|
||||
public IDeleteable<T> WhereColumns(List<Dictionary<string, object>> list)
|
||||
|
@@ -31,6 +31,7 @@ namespace SqlSugar
|
||||
IDeleteable<T> Where(string whereString, SugarParameter parameter);
|
||||
IDeleteable<T> Where(string whereString, SugarParameter[] parameters);
|
||||
IDeleteable<T> Where(string whereString, List<SugarParameter> parameters);
|
||||
IDeleteable<T> WhereColumns(T data, Expression<Func<T, object>> columns);
|
||||
IDeleteable<T> WhereColumns(List<T> list,Expression<Func<T, object>> columns);
|
||||
IDeleteable<T> WhereColumns(List<Dictionary<string,object>> columns);
|
||||
IDeleteable<T> Where(List<IConditionalModel> conditionalModels);
|
||||
|
Reference in New Issue
Block a user