Generic repository lifetime configuration with Windsor
I'm out of ideas how to configure right Windsor container for use with repositories in Windows app. I have generic repository implementation Repository, where T is entity type, it has a dependency IDatacontextProvider, which provides datacontext for it: public class Repository<T> : IRepository<T> where T : class { protected DataContext DataContext; public Repository(IDataContextProvider dataContextProvider) { DataContext = dataContextProvider.DataContext; } .... } And for simple things everything works ok with following configuration: container.Register( Component.For<IDataContextProvider>()