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

Commented Issue: Support Read-Only Context or DbSet [601]

$
0
0
It would be great to have a broader way to define no tracking contexts or no tracking DbSets so that we can design read-only models or DbSets. Yes we can control that in a repository but controlling it at the context or DbSet level would be simpler for devs to implement read-only data. It could also alleviate the problem of accidentally tracking data because you've set a navigation property. My pref would be to see this for a context. It would let you query but nothing else. Not sure how this will effect relationships via eager, lazy or explicit loading.
Comments: Just for clarification...even if we've removed "no tracking", one of the goals is to reduce the effort of creating the stateentry objects upon materialization. for the sake of identity management, I can imagine a class that is a stripped down version of state entry. But if we started dealing with identity, then relationships and then all of the relationship management would be involved as well. Just some thoughts for anyone who's interested in working on this.

Viewing all articles
Browse latest Browse all 10318

Trending Articles



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