Quantcast
Channel: Entity Framework
Viewing all articles
Browse latest Browse all 10318

Commented Feature: Support for NavigationProperties for AuditTrail [1324]

$
0
0
If you are using the .ChangeTracker on your Context, it's impossible to implement a good AuditTrail without getting the OriginalValues for NavigationProperties. Simple Properties have this ability to get Original and CurrentValue. Also referencing from ForeignKey to NavigationProperty is not available.

After messing around, i wrote some Attributes to reference from the ForeignKey to the NavigationProperty, and used the .ToString() method on the NavProp to get the records logical name.

But all without the original value (records logical name) in the AuditTrail.
Comments: __EF Team Triage:__ We agree it would be nice to expose an easier way to get at the original values from the DbContext API. Currently you would need to drop down to ObjectContext and mess around with RelatedEnds, EntityKeys, etc. Moving to Future release to consider post-EF6.

Viewing all articles
Browse latest Browse all 10318

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>