I have the following configuration in Simple Injector:
c.Register<IQueryable<Entity1>>(() => c.GetInstance<IDomainQueryFactory>().Query<Entity1>());
c.Register<IQueryable<Entity2>>(() => c.GetInstance<IDomainQueryFactory>().Query<Entity2>());
c.Register<IQueryable<Entity3>>(() => c.GetInstance<IDomainQueryFactory>().Query<Entity3>());
c.Register<IQueryable<Entity4>>(() => c.GetInstance<IDomainQueryFactory>().Query<Entity4>());
...
The IDomainQueryFactory factory is responsible for creating the instances of IQueryable<TEntity>. Some class (like MVC controller) then declares dependency only on IQueryable<Entity1>.
I am wondering if there is some way of writing these registrations with a single command.