koenbeuk / EntityFrameworkCore.Triggered

Triggers for EFCore. Respond to changes in your DbContext before and after they are committed to the database.
MIT License
554 stars 29 forks source link

SaveChangesWithoutTriggersAsync throws when invoked from within a trigger #187

Closed koenbeuk closed 11 months ago

koenbeuk commented 1 year ago

Discussed in https://github.com/koenbeuk/EntityFrameworkCore.Triggered/discussions/181

Originally posted by **nahropro** August 1, 2023 I have an after save trigger, in that trigger I update some entity and for avoid infinite loop I make a call to SaveChangesWithoutTriggersAsync(), but it throws this exception 'System.InvalidOperationException: 'A triggerSession has already been created''!
stale[bot] commented 11 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

jepzen commented 2 weeks ago

I like to reopen this