How to register generic repository in Unity.
I am doing this
container.RegisterType(typeof(IRepository<>), typeof(Repository<>));
But it is not working
Throwing below exception
Resolution of the dependency failed, type = "StudentManagement.IData.IRepository.IRepository`1[StudentManagement.Models.Model.Studentcontacts]", name = "(none)".
Exception occurred while: while resolving.
Exception is: InvalidOperationException - The current type, StudentManagement.IData.IRepository.IRepository`1[StudentManagement.Models.Model.Studentcontacts], is an interface and cannot be constructed. Are you missing a type mapping?
-----------------------------------------------
At the time of the exception, the container was:
Resolving StudentManagement.IData.IRepository.IRepository`1[StudentManagement.Models.Model.Studentcontacts],(none)
urgent help will be highlt appricable