Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow reference data to be pre-loaded into the context #12206

Open
Tracked by #22947
ajcvickers opened this issue Jun 1, 2018 · 4 comments
Open
Tracked by #22947

Allow reference data to be pre-loaded into the context #12206

ajcvickers opened this issue Jun 1, 2018 · 4 comments

Comments

@ajcvickers
Copy link
Member

That is, entity instances which are read-only and should always be present without needing to query from the database.

@gojanpaolo
Copy link

Might be related to #7586 Feature request: read only entities

@AndriySvyryd
Copy link
Member

Related to #14922

@douglasg14b
Copy link

This feature would be very welcome! It can be bothersome having to make DB round-trips for read-only data to fill in entity graphs when they could be permanently in memory.

@borzag
Copy link

borzag commented Dec 11, 2023

In my project we have struggled a lot when we have tried to preload enum like read only data, share it among several unit of work (dbcontext instances ) and tried to have ef understand that it's existing data and it's never should be created in the database. We, as others have tried, did it to avoid ef keep track of it and to gain performance. It has driven us crazy to understand why we constantly get the error that ef/sql server could not insert the data because the key already exit. We have tried so many approaches and ways to get the changetracker understand what we want.

So as a short summary, this issue would be a VERY much appreciated feature to us in our project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants