NickStrupat / EntityFramework.Triggers

Adds events for entity inserting, inserted, updating, updated, deleting, and deleted
MIT License
373 stars 46 forks source link

Bug: cancelling event causes all other entities events to be cancelled too #61

Closed be4i closed 3 years ago

be4i commented 3 years ago

Hello,

I have a soft delete trigger, and this causes stackoverflow when trying to add/remove same entities at once with async.With same debugging i noticed this line, witch causes all other entity events after that to be cancelled.You can also see that in the sync version here the variable is inside the loop as it should be.When i moved the canceled variable inside the loop my problem with stackoverflow was fixed.

NickStrupat commented 3 years ago

Thank you for the note. This is a bug. I'll look into fixing this.

NickStrupat commented 3 years ago

@be4i This should now be fixed on the latest NuGet package. Feel free to re-open this if it doesn't work :)