Changes ApplicationContext to expect arguments of DatabaseContext and ServiceContext for it to be
constructed. Changes DatabaseContext to not be a singleton. Changes ServiceContext not to be a singleton. Removed ServicesFactory. Updated unit tests to support new changes.
This commit is contained in:
@@ -49,7 +49,7 @@ namespace Umbraco.Core.Services
|
||||
if(HttpRuntime.Cache[cacheKey] == null)
|
||||
{
|
||||
userId =
|
||||
DatabaseContext.Current.Database.ExecuteScalar<int>(
|
||||
_unitOfWork.Database.ExecuteScalar<int>(
|
||||
"select userID from umbracoUserLogins where contextID = @ContextId",
|
||||
new {ContextId = new Guid(contextId)});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user