Commit Graph

5 Commits

Author SHA1 Message Date
Morten Christensen
fcda8cc7ca Reordering using statements in ContentService to ensure that Events and Audit Trails exists outside the using. 2012-12-15 11:04:03 -01:00
Morten Christensen
5334ec3ff8 Minor adjustment to the ctor's of DefaultDatabaseFactory and PetaPocoUnitOfWorkProvider that clarifies the use of either ConnectionStringName or a custom ConnectionString+ProviderName. 2012-12-15 10:12:17 -01:00
Shannon Deminick
ad7aa66b0b Changes PetaPocoUnitOfWorkFactory to accept an IDatabaseFactory as ctor. Changes PetaPocoUnitOfWork to not dispose of the Database since
it will be shared with the current thread in order to support nested transactions and changes how the Transaction object is created
and used and then disposed of. Changes PetaPocoUnitOfWorkFactory to ensure that the UOW is
created with the shared Database instance. Fixes a method in UserService to ensure that the UOW is disposed since it wasn't using a repository.
2012-12-15 08:41:46 +05:00
Shannon Deminick
1132547c24 Changed required Database references to UmbracoDatabase 2012-12-12 05:48:18 +05:00
Shannon Deminick
a0e4492a35 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