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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user