/// <summary> /// Register all services /// </summary> /// <param name="registrar">Registrar used for the registration</param> public void Register(IContainerRegistrar registrar) { registrar.RegisterService(x => _store.OpenSession(), Lifetime.Scoped); registrar.RegisterConcrete<UowAdapter>(Lifetime.Scoped); //registrar.RegisterService(x => new UowAdapter(x.Resolve<IDocumentSession>(), _observer), Lifetime.Scoped); registrar.RegisterInstance(typeof (IUnitOfWorkObserver), _observerAdapter); registrar.RegisterInstance(typeof (IUnitOfWorkAdapter), this); }