✅ Using a scoped service within an IHostedService
I have a IHostedService implementation that sends a Mediatr request every hour. The handler uses a DbContext to carry out its work.
When sending the request, I get the following exception:
I have tried to create an async scope, but I still get the exception.
I have listed the project in GitHub. Here is a link to where the functionality lies https://github.com/Scharps/AuctionData/blob/Scharps/issue15/AuctionData.ApplicationCore/Features/ProcessAuctionData.cs
Thank you for reading.
When sending the request, I get the following exception:
I have tried to create an async scope, but I still get the exception.
I have listed the project in GitHub. Here is a link to where the functionality lies https://github.com/Scharps/AuctionData/blob/Scharps/issue15/AuctionData.ApplicationCore/Features/ProcessAuctionData.cs
Thank you for reading.