Unity: Register and resolve class with generic type
I'm using Unity and try to follow to SOLID-principles as far as possible. Therefore all implementations only have dependencies to interfaces. I have a collectionwrapper which looks like this: public interface ICollectionWrapper<TModel> { int TotalCount { get; set; } IEnumerable<TModel> Items { get; set; } } Now I want to create the instance of ICollectionFactory<T> with a factory. This is what I got so far: public interface ICollectionWrapperFactory { ICollectionWrapper<T> CreateCollection<T>(); ICollectionWrapper<T> CreateCollection<T>(IEnumerable<T> items); ICollectionWrapper<T>