How to get changed and original values in navigation properties #750
Unanswered
chrismikec
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
-
Similar to #383, with a twist where I want to see the changes in navigation property entities and include them on the main entity log.
I want to access navigation properties on an entity (already done, using IncludeEntityObjects). However, I seem to only be able to see the entities after the changes. I don't just want the current values in the navigation property, I want to see changes there too, while attaching them to the current entity log. That is, I need to see the old version of the navigation property entities so I can show the old vs new
For instance, (just a simple example) if I have a Classroom entity, and that has a navigation property to a collection of Students. The list of students could change over time (adding new ones, removing old ones), and I want to log those changes with the class log as opposed to logging each student change separately.
So, I want the audit log for a Classroom to be able to list the Student old and new values. I don't want separate audit logs for Students, I just want to list the name of the students into a field on the Classroom log.
I can see the entity changes on the Students attached to the book entity, but I can't see the original list of students so that I can see what changed: I can only see what the new list of Students looks like.
Is there some way to access the original Classroom entity itself, and all of the original List of Students?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions