Fixes issue with ThreadStatic db

Uses IScopeContext which wraps either HttpContext or CallContext which is created/injected via IOC factory.
This commit is contained in:
Shannon
2016-04-29 17:08:34 +02:00
parent 5c24a3a734
commit bd31dd6caf
37 changed files with 270 additions and 95 deletions

View File

@@ -24,6 +24,8 @@ namespace Umbraco.Core.DependencyInjection
container.Register<ISqlSyntaxProvider, SqlCeSyntaxProvider>("SqlCeSyntaxProvider");
container.Register<ISqlSyntaxProvider, SqlServerSyntaxProvider>("SqlServerSyntaxProvider");
container.RegisterSingleton<IScopeContextFactory, DefaultScopeContextFactory>();
// register database factory
// will be initialized with syntax providers and a logger, and will try to configure
// from the default connection string name, if possible, else will remain non-configured