Autofac Resolve <IEnumerable <T>> () returns an empty list
I read a lot of Autofac / wikis docs that indicate that I can get a list of all registered types by doing something simple, as shown below:
var builder = new ContainerBuilder(); builder.RegisterAssemblyTypes(Assembly.GetExecutingAssembly()) .AssignableTo<IPersistedModel>(); var container = builder.Build(); var allTypes = container.Resolve<IEnumerable<IPersistedModel>>(); The allTypes problem appears blank.
In the debugger, I see inside the container, and there are 7 suitable types and even an IPersistedModel array ... but they do not return to Resolve ().
What am I missing?
+4