-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
Devise solution for IHostedService and service provider/HttpContext #1844
Comments
I have commented on #1831 with my (a) solution as per the year 2017. Note: I see its there, but it doesn't light up within .netcoreapp3.1 project, for example this is inside the Blazor.Server sample project inside this repo: |
As of #1876 this scenario should be possible, by the background job creating a DI scope and setting the csla scoped provider. Not sure how this information should be surfaced - perhaps we should add some tests for this scenario to the asp.net core test suite. |
I don't believe there are currently any ASP.NET Core "unit tests" - at least not that require that the CI server host a web server. |
Asp.net core ships a
https://adamstorr.azurewebsites.net/blog/integration-testing-with-aspnetcore-3-1 |
Yes, I think that would be a good addition to the test suite! |
As per #1831, a
IHostedService
doesn't get access toHttpContext
, and thusLocalContext
(containing the DI service provider) doesn't flow from ASP.NET into a service.The text was updated successfully, but these errors were encountered: