Using EF DbContext in Background Tasks (IHostedService)Create scopes inside background tasks and resolve DbContext from the scope to respect scoped lifetimes.