diff --git a/Source/EntityFramework.Extended/Batch/SqlServerBatchRunner.cs b/Source/EntityFramework.Extended/Batch/SqlServerBatchRunner.cs index 8f2fbb0..78b671e 100644 --- a/Source/EntityFramework.Extended/Batch/SqlServerBatchRunner.cs +++ b/Source/EntityFramework.Extended/Batch/SqlServerBatchRunner.cs @@ -12,6 +12,7 @@ using EntityFramework.Extensions; using EntityFramework.Mapping; using EntityFramework.Reflection; +using System.Data.Entity.Infrastructure.Interception; namespace EntityFramework.Batch { @@ -121,6 +122,7 @@ private int InternalDelete(ObjectContext objectContext, EntityMap entit deleteCommand.CommandText = sqlBuilder.ToString(); + DbInterception.Dispatch.Command.NonQuery(deleteCommand, new DbCommandInterceptionContext(objectContext.InterceptionContext)); #if NET45 int result = async ? await deleteCommand.ExecuteNonQueryAsync().ConfigureAwait(false) @@ -364,6 +366,7 @@ private int InternalUpdate(ObjectContext objectContext, EntityMap entit sqlBuilder.Append(")"); updateCommand.CommandText = sqlBuilder.ToString(); + DbInterception.Dispatch.Command.NonQuery(updateCommand, new DbCommandInterceptionContext(objectContext.InterceptionContext)); #if NET45 int result = async