I have an interface that has 2 generic parameters.
IStorage<TEntity, TKey> And a class that implements the interface
SqlStorage<TEntity, TKey> How to register them in Unity Container? It is written on msdn to do this:
container.RegisterType( typeof(IStorage<>), typeof(SqlStorage<>), new ContainerLifeTimeManager(), new InjectionConstructor( new object[] { new GenericParameter("TEntity"), new GenericParameter("TKey") })); But, VS swears at the wrong amount of parameters in typeof (IStorage <>) and typeof (Storage <>).
What am I doing wrong and right?