public void EndLifetimeScope() { if (_requestLifetimeScopeProvider != null) { _requestLifetimeScopeProvider.EndLifetimeScope(); if (_originalResolver != null) { DependencyResolver.SetResolver(_originalResolver); } } }
void AutofacMvcApplication_EndRequest(object sender, EventArgs e) { _lifetimeScopeProvider.EndLifetimeScope(); }