-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
DbContextActivator missing in net core 3? #22327
Comments
We made it a little harder to reference the EFCore.Design assembly where it lives. See Microsoft.EntityFrameworkCore.Design is now a DevelopmentDependency package. Out of curiosity, how what are you using it for? |
Thanks for the explanation. Well, I am breaking the DI pattern and recreate DB Contexts at certain intervals or after x transactions instead, performing operations in a BackgroundService per database. I still believe that must be a lot better where I have hundreds or thousands of operations per second also it is only created in that class. This is a game server running in IIS so I get a lot of database input via web socket communication. I don't use Controllers for realtime data management that much and can't DI all my various classes since the classes remain alive until the application dies. I tried retrieving the context from services but it becomes disposed. But yeah if you have a silver bullet for DI with persistent classes or retrieving contexts from IWebHost.Services and I am totally wrong about my assumption I'd be happy to learn :D public class DbThreadUpdater<T, C> : BackgroundService where C : DbContext |
Thanks! |
Hello,
I can't find the DbContextActivator class after upgrading to net core 3.1. I was using it and was wondering if it has been removed?
The text was updated successfully, but these errors were encountered: