What should I register with my IoC container?
	
If you are going to use an IoC container, regardless of which one, here is what needs to be registered, and some thoughts about object lifetime. If we do not specify a lifetime, you can assume that singleton is acceptable.
Highway.Data
- IRepositoryshould resolve to- Repositoryon either a transient (new every request) or per web request (if you’re in a website) object lifetime.
- IEventManagershould resolve to- EventManager
- ILogshould resolve to either a Common.Logging implementation for your chosen logger, or an instance of- NoOpLoggerfrom Common.Logging.
Highway.Data.EntityFramework
- IDataContextshould resolve to- DataContexton either a transient (new every request).- Your IoC will need to inject a connection string, named connectionStringto the constructor, in whatever way such primitive dependencies are handled by your container.
 
- Your IoC will need to inject a connection string, named 
- IMappingConfigurationshould resolve to a type you have created that implements this interface and maps all of your entities.
- IContextConfigurationshould resolve to- DefaultContextConfigurationor a class you’ve created should you need to change how the Context is configured from our defaults.
Highway.Data.NHibernate
- IDataContextshould resolve to- DataContexton either a transient (new every request).
- ISessionshould resolve to a call to your configured- ISessionFactory. These are standard NHibernate interfaces, and you should follow their guidance regarding object lifetime.
Highway.Data.RavenDb
- IDataContextshould resolve to- DataContexton either a transient (new every request).
- IDocumentSessionshould resolve to a call to your configured- IDocumentStore. These are standard RavenDb interfaces, and you should follow their guidance regarding object lifetime.