Logo
Explore Help
Sign In
yv01p/Umbraco-CMS
1
0
Fork 0
You've already forked Umbraco-CMS
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
a0e4492a351ebe0077a563e80f33f3f46efd5cb2
Umbraco-CMS/src/Umbraco.Core/Persistence/IDatabaseFactory.cs

12 lines
259 B
C#
Raw Normal View History

New implementation of IDatabaseFactory, allows setting the DatabaseContext.Current at runtime with a custom IDatabaseFactory (mostly for testing). Changes AuditTrail to internal so the public way is just with the 'Audit' class. Fixed ThreadSafetyServiceTests which was failing with the new AuditTrail stuff because of the Database instances, this is not solved with the new PerThreadDatabaseFactory for the unit test. Created new 'UmbracoDatabase' object which inherits from the PetaPoco one so that we can future proof the implementation as we might want some custom logic on there. Now the IDatabaseFactory returns an UmbracoDatabase instead of just Database.
2012-12-12 03:47:04 +05:00
using System;
namespace Umbraco.Core.Persistence
{
/// <summary>
/// Used to create the UmbracoDatabase for use in the DatabaseContext
/// </summary>
internal interface IDatabaseFactory : IDisposable
{
UmbracoDatabase CreateDatabase();
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.3 Page: 37ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API