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:
Shannon Deminick
2012-12-14 08:06:32 +05:00
parent e5ddcc756c
commit a9cb337a96
22 changed files with 262 additions and 178 deletions

View File

@@ -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)});