Unable to resolve service
Hi! Another unpleasant issue faced unfortunately:
Unable to resolve service for type 'ISomeLogic' while attempting to activate 'MyUberService'.
In my service class constructor I want to resolve DI:
private ISomeLogic _someLogic;
public MyUberService(ISomeLogic someLogic)
{
_someLogic= someLogic;
}
but when I call it, in middleware var serviceInstance = serviceProvider.GetService(_service.ServiceType); gives me that error.
Looks like before it calls MyUberService it needs to resolve ISomeLogic!
Maybe we could think about some option to pass/configure extra services to this serviceProvider from UseSoapEndpoint or something similar?
https://docs.microsoft.com/en-us/aspnet/core/fundamentals/dependency-injection?view=aspnetcore-2.1 You should register implementation of interface ISomeLogic in ASP.NET Core DI container.
Yes I had registered it but in wrong one. Sorry my unintentional mistake!