|
@ -108,6 +108,7 @@ namespace SqlSugar |
|
|
Where(SqlBuilder.SqlFalse); |
|
|
Where(SqlBuilder.SqlFalse); |
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
|
|
|
DataAop(deleteObjs); |
|
|
string tableName = this.Context.EntityMaintenance.GetTableName<T>(); |
|
|
string tableName = this.Context.EntityMaintenance.GetTableName<T>(); |
|
|
var primaryFields = this.GetPrimaryKeys(); |
|
|
var primaryFields = this.GetPrimaryKeys(); |
|
|
var isSinglePrimaryKey = primaryFields.Count == 1; |
|
|
var isSinglePrimaryKey = primaryFields.Count == 1; |
|
@ -620,5 +621,18 @@ namespace SqlSugar |
|
|
} |
|
|
} |
|
|
return result; |
|
|
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); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|