I wanted to try the same thing before, and it worked out like this:
services.AddTransient(typeof(IAbcService<>), typeof(AbcService<>)); services.AddTransient(typeof(IAbcService<Person>), typeof(AbcService<Person>));
Separate a different structure, this is recorded by the parameters in the method.
To develop, as you can see in the above example, a new DNX infrastructure package, we can now register both open and closed generics. Try it, both lines will work.
source share