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

Example using dbcontextfactory? #325

Closed
marcusjm opened this issue May 3, 2023 · 5 comments
Closed

Example using dbcontextfactory? #325

marcusjm opened this issue May 3, 2023 · 5 comments

Comments

@marcusjm
Copy link

marcusjm commented May 3, 2023

Is it possible to use this in conjuction with Dbcontextfactory? I am just wondering since RepositoryBase uses the regular DbContext.

@marcusjm
Copy link
Author

marcusjm commented May 3, 2023

Nevermind, I just realised there is a Factory version now. It wasn't in the eshop example so I missed it
Although, is there an example on how to init a DI container with the factory instead?

@pavloss
Copy link

pavloss commented May 9, 2023

This isn't available in the current release, but you can have a look at this PR 289.
I believe this is what you are looking for.

@marcusjm
Copy link
Author

I realised too late that this was scheduled for 15/5. I will wait :)

@joedirt
Copy link

joedirt commented Jul 5, 2023

Is there an example of this? I'm trying to figure out how to get my functioning code, which uses DI and IRepository converted to the dbcontextfactory concept. I'm not succeeding and an example would be appreciated. Thanks

@fiseni
Copy link
Collaborator

fiseni commented Jul 21, 2023

The feature is already published some time ago in version 7. The feature was a contribution from a community member, and there are a few tests here where you can see the usage.

Feel free to reopen the issue if you have further questions.

@fiseni fiseni closed this as completed Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants