Browse Source

Synchronization code

pull/29/head
sunkaixuan 2 years ago
parent
commit
2f3c567a21
  1. 16
      Src/Asp.Net/SqlSugar/Abstract/DeleteProvider/DeleteableProvider.cs
  2. 1
      Src/Asp.Net/SqlSugar/Interface/IDeleteable.cs

16
Src/Asp.Net/SqlSugar/Abstract/DeleteProvider/DeleteableProvider.cs

@ -53,7 +53,7 @@ namespace SqlSugar
string sql; string sql;
SugarParameter[] paramters; SugarParameter[] paramters;
_ExecuteCommand(out sql, out paramters); _ExecuteCommand(out sql, out paramters);
var result =await Db.ExecuteCommandAsync(sql, paramters); var result = await Db.ExecuteCommandAsync(sql, paramters);
After(sql); After(sql);
return result; return result;
} }
@ -61,7 +61,7 @@ namespace SqlSugar
{ {
return await ExecuteCommandAsync() > 0; return await ExecuteCommandAsync() > 0;
} }
public IDeleteable<T> AsType(Type tableNameType) public IDeleteable<T> AsType(Type tableNameType)
{ {
return AS(this.Context.EntityMaintenance.GetEntityInfo(tableNameType).DbTableName); return AS(this.Context.EntityMaintenance.GetEntityInfo(tableNameType).DbTableName);
} }
@ -79,7 +79,17 @@ namespace SqlSugar
this.Context.MappingTables.Add(entityName, tableName); this.Context.MappingTables.Add(entityName, tableName);
return this; ; return this; ;
} }
public IDeleteable<T> EnableDiffLogEventIF(bool isEnableDiffLogEvent, object businessData = null)
{
if (isEnableDiffLogEvent)
{
return EnableDiffLogEvent(businessData);
}
else
{
return this;
}
}
public IDeleteable<T> EnableDiffLogEvent(object businessData = null) public IDeleteable<T> EnableDiffLogEvent(object businessData = null)
{ {

1
Src/Asp.Net/SqlSugar/Interface/IDeleteable.cs

@ -34,6 +34,7 @@ namespace SqlSugar
IDeleteable<T> WhereColumns(List<T> list,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> WhereColumns(List<Dictionary<string,object>> columns);
IDeleteable<T> Where(List<IConditionalModel> conditionalModels); IDeleteable<T> Where(List<IConditionalModel> conditionalModels);
IDeleteable<T> EnableDiffLogEventIF(bool isEnableDiffLogEvent, object businessData = null);
IDeleteable<T> EnableDiffLogEvent(object businessData = null); IDeleteable<T> EnableDiffLogEvent(object businessData = null);
IDeleteable<T> RemoveDataCache(); IDeleteable<T> RemoveDataCache();
IDeleteable<T> RemoveDataCache(string likeString); IDeleteable<T> RemoveDataCache(string likeString);

Loading…
Cancel
Save