mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 13:06:50 +08:00
Synchronization code
This commit is contained in:
parent
44f24c41d6
commit
33b906a721
@ -108,6 +108,7 @@ namespace SqlSugar
|
||||
Where(SqlBuilder.SqlFalse);
|
||||
return this;
|
||||
}
|
||||
DataAop(deleteObjs);
|
||||
string tableName = this.Context.EntityMaintenance.GetTableName<T>();
|
||||
var primaryFields = this.GetPrimaryKeys();
|
||||
var isSinglePrimaryKey = primaryFields.Count == 1;
|
||||
@ -620,5 +621,18 @@ namespace SqlSugar
|
||||
}
|
||||
return result;
|
||||
}
|
||||
private void DataAop(object deleteObj)
|
||||
{
|
||||
var dataEvent = this.Context.CurrentConnectionConfig.AopEvents?.DataExecuting;
|
||||
if (deleteObj != null&& dataEvent!=null)
|
||||
{
|
||||
var model = new DataFilterModel()
|
||||
{
|
||||
OperationType = DataFilterType.DeleteByObject,
|
||||
EntityValue = deleteObj,
|
||||
};
|
||||
dataEvent(deleteObj,model);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,8 @@ namespace SqlSugar
|
||||
public enum DataFilterType
|
||||
{
|
||||
UpdateByObject = 0,
|
||||
InsertByObject = 1
|
||||
InsertByObject = 1,
|
||||
DeleteByObject =2
|
||||
}
|
||||
public class DataFilterModel
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user