Why is the HasChangedOwnedEntities() method needed in the implementation of AuditableEntityInterceptor ? #1149
Unanswered
EnricoMassone
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Good evening everyone, I'm writing here looking for some clarifications on the
AuditableEntityInterceptor
class.My question is related to the
HasChangedOwnedEntities()
extension method.Is that really needed ?
Why the condition expressed by
entry.State is EntityState.Added or EntityState.Modified
is not enough to identify any entity which has been added or modified during the current unit of work ?My understanding is that the purpose of the
HasChangedOwnedEntities()
method is to detect entities which must be considered modified because at least one of their owned entities has been modified during the current unit of work.Is my understanding correct ?
Why simply checking the condition
entry.State == EntityState.Modified
is not enough to identify these entities ?Thanks in advance to anyone providing some clarification on this.
Beta Was this translation helpful? Give feedback.
All reactions