Browse Source

Logic Delete Async bug

pull/10/MERGE
sunkaixuna 3 years ago
parent
commit
fc916d00fa
  1. 4
      Src/Asp.Net/SqlSugar/Abstract/DeleteProvider/LogicDeleteProvider.cs

4
Src/Asp.Net/SqlSugar/Abstract/DeleteProvider/LogicDeleteProvider.cs

@ -30,11 +30,11 @@ namespace SqlSugar
List<SugarParameter> pars; List<SugarParameter> pars;
string where; string where;
LogicFieldName = _ExecuteCommand(LogicFieldName, out db, out where, out pars); LogicFieldName = _ExecuteCommand(LogicFieldName, out db, out where, out pars);
var updateable = db.Updateable<T>().SetColumns(LogicFieldName, "@IsDeleted"); var updateable = db.Updateable<T>().SetColumns(LogicFieldName, true);
if (pars != null) if (pars != null)
updateable.UpdateBuilder.Parameters.AddRange(pars); updateable.UpdateBuilder.Parameters.AddRange(pars);
Convert(updateable as UpdateableProvider<T>); Convert(updateable as UpdateableProvider<T>);
var result =await updateable.Where(where, new { IsDeleted = true }).ExecuteCommandAsync(); var result =await updateable.Where(where).ExecuteCommandAsync();
return result; return result;
} }

Loading…
Cancel
Save