How to register interface with Generic type in Startup.cs
问题 I am using WebAPI in ASP.NET Core. This works: services.AddScoped<IApiKeysService, APIKeysService>(); Now that the interface is returning a generic type T This does not services.AddScoped<IApiKeysService>(); Error Using the generic type blah requires 1 type Arguments Or this services.AddScoped<IApiKeysService<T>>(); I get the following compile error type or namespace T cannot be found How do I register it in Startup.cs ? NOTE: I cannot use a concrete type because the interface member is a