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

Accessing DbContext from model #7409

Closed
sepplK opened this issue Jan 13, 2017 · 1 comment
Closed

Accessing DbContext from model #7409

sepplK opened this issue Jan 13, 2017 · 1 comment

Comments

@sepplK
Copy link

sepplK commented Jan 13, 2017

Version: EntityFrameworkCore 1.1.0 (SQL)

Hi,

i can't figure out how to access the DbContext from a readonly property in the model.

Maybe with the IEntityMaterializerSource (optionsBuilder.ReplaceService...) and using another constructor to inject the current DbContext?

Thanks for help.

Sebastian

@ajcvickers
Copy link
Contributor

@sepplK Not really possible right now unless you are willing to hack internal code. Covered by #626 and see my comments on #7124

@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
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

2 participants