Autofac Resolve Open Generic Interface with Open Generic Class
So I have an interface and class: public interface IMyInterface<T> where T : ISomeEntity {} public class MyClass<T> : IMyInterface<T> where T : ISomeEntity {} I will have some class that calls for it: public class SomeClass : ISomeClass { public SomeClass (IMyInterface<AuditEntity> myInterface) {} } I've done all sorts of things to get it to register the open generic interface and class with no luck. I just want to say something like: container.RegisterType(typeof(MyClass<>)).As(typeof(IMyInterface<>)); It would be annoying if I have to go through and explicitly do something like: container