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

Edited 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.

Viewing all articles
Browse latest Browse all 10318

Trending Articles



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