Skip to content

Instantly share code, notes, and snippets.

@johnallers
Created December 7, 2011 17:41
Show Gist options
  • Save johnallers/1443759 to your computer and use it in GitHub Desktop.
Save johnallers/1443759 to your computer and use it in GitHub Desktop.
Registering generic types using Unity
IUnityContainer container = new UnityContainer();
container.RegisterType(typeof(IRepository<>), typeof(EfRepository<>));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment