I Want to archive a global solution to all of my generic services, I Have the following code:
services.AddScoped(typeof(IService<>), provider => ResolveService(genericType));
I need one parameter that is the generic type needed to resolve the service and return the right instance.
There is a way to extract the Generic type needed by the interface in this case?