Last post Dec 04, 2019 05:08 PM by bruce (sqlwork.com)
Dec 04, 2019 04:43 PM|Volker Hetzer|LINK
I'm doing a backgound job listening to a queue as per doc:
Now, the problem is that some services need the user identity of the original request. Or at least some claims from there.
Is there any way that I can register dependencies with the newly created scope?
Like, I have two classes implementing an interface, say, IUserNameProvider, and one has the claims identity as constructor parameter, and one the username, and I want the one class to be used in a normal call, and the other in an independent scope.
I was hoping to be able to register the other provider as singleton instance in that other scope.
Is something like that possible? If not, is there a recommended way of doing it?
Dec 04, 2019 05:08 PM|bruce (sqlwork.com)|LINK
the user identity should be passed via the queue request, not injected via constructor.