You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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: