Commit Graph

13 Commits

Author SHA1 Message Date
Stephan
597b9bbfcb Introduce SafeCallContext to fix breaking test
(wondering if using logical call context a breaking change)
2016-09-13 08:01:45 +02:00
Shannon
c1da28dd47 U4-8837 Change paging query for SQL server 2012+ to be more efficient 2016-08-09 15:33:35 +02:00
Shannon
6124126835 Fixes the custom field sorting, no longer has a sub query for order by, now supports both mysql and sqlce, adds a unit test (should add more though) 2016-04-20 15:50:38 +02:00
Stephan
42c23dadc9 U4-7887 - default to database connection timeout 2016-02-04 14:51:19 +01:00
Andrey Shchekin
9498bc4bfd U4-7352 Fixed exception logging in UmbracoDatabase. 2015-10-30 11:24:18 +13:00
Shannon
201512d5f2 Fixes :U4-6858 add localizationService.GetDictionaryItemDescendants, also obsoletes FlattenList since if used incorrectly could cause a flood of SQL calls, adds some tests to verify the output of SelectRecursive is in the same order and updates anything using FlattenList to SelectRecursive. Updates the Language repository to use GetAll wherever possible so all languages are simply cached, this means there less overall cache and less lookups. Updates the Dictionary repository to have less N+1 lookups when building the entity from the DTO by just looking up all languages instead of one at a time. Adds tests for getting descendants for dictionary items. 2015-07-22 12:10:21 +02:00
Shannon
5bef3593dd More dependency cleanup, less singleton usages, better testing implementations 2015-01-09 15:27:47 +11:00
Shannon
957760d29a Creates IDisposeOnRequestEnd and ensures UmbracoContext and UmbracoDatabase implement it, then we only dispose of these types of objects at the end of the request if they are part of the httpcontext items (U4-2738). Fixes: U4-2988 UmbracoObjectTypesExtensions is not thread safe 2013-09-30 12:02:35 +10:00
Shannon
b7f6195791 Started adding base PermissionsRepository for sub classes to use for assigning permissions, created a BulkImport extension methods for PetaPoco with tests since we'll be needing that for assigning permissions in a nice way. Wrote unit tests for all sql gen for permissions and assigning permissions. This all starts fixing #U4-2161 but there's still a bit more work to do. 2013-07-08 17:29:26 +10:00
NielsHartvig@UMBRACORATI.localdomain
f04916c9a9 Adds MiniProfiler support 2013-05-10 10:15:30 -02:00
Morten Christensen
b5a140945a Fixes U4-1479 by adding .ToList() to allowed templates, which ensures that the list is fetched from the database while the connection is still open.
Fixing typo in usage of LogHelper in PhysicalFileSystem.
Ensures connection is closed after using TableExists for MySql.
Adds logging to UmbracoDatabase.
2013-01-18 09:00:18 -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
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