Shannon
5bef3593dd
More dependency cleanup, less singleton usages, better testing implementations
2015-01-09 15:27:47 +11:00
Shannon
86e82c7674
Updates PartialView & PartialViewMacros models/services/repositories, streamlines their operations, fixes up other underlying problems with the FileRepository, fixes tree syncing for partial views, partial view macros and scripts, fixes scripts being created in folders, allows partial views and partial view macros to be managed and created in folders, fixes FileUnitOfWork to use a queue, publicizes some internal test classes, fixes tree syncing when dealing with invariant case, adds correct validation to the create dialogs of scripts and partial views (and partial view macros)
2014-10-22 16:44:45 +10:00
Shannon
863e8b5024
Changes PetaPoco UOW to use a Queue instead of trying to order by a date which even in ticks is sometimes the same. Changes some content ext to accept the service it needs instead of relying on the app ctx singleton and obsoletes others. Fixes ContentBase.ContentTypeId to check if the Id has been set on it's true ContentTypeBase which is required with the new foreign key to insert entities (this was actually a bug without the foreign key). Updates media/content services with paging to use parameters correctly. Fixes tests.
2014-10-01 10:18:51 +10:00
Shannon
949748a7f7
Added some overloads to the data type service to be able to save data types + pre-values in one transaction, and also to be able to update pre-values (before we could only insert). Got the data type editor now validating and saving values back to the db. Updated the content views (content/media) to have a correct form structure with ng-submit working.
2013-08-20 14:44:59 +10:00
Morten Christensen
fabe5f83a7
Rearranging using statements in MediaService to ensure events are fired before after using, and that the AuditTrail writes after the uow has been disposed.
...
Adding GetById overload in MediaService to allow lookup by UniqueId guid.
2012-12-15 11:17:32 -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
b73efd16dc
Fixes ServiceContext to ensure the repo's are lazy instantiated because their ctor's rely on the
...
RepositoryResolver.Current being initialized which normally doesn't occur until after the ServiceContext
is constructed. Adds instance level caching for the GetRecursiveValue method in case this is called more than
one time for a property in one view. Reverts PetaPocoUnitOfWork to allow more than one call to Commit().. this
isn't 'best practices' per se but it is more for performance reasons because otherwise we'd have to create a new
repo object + uow for any bulk saving operations... The end result is the same, bulk operations in the Services
cannot be processed in one transaction. Fixing up the ContentServiceTests by ensuring that the shared and always open sqlce
connection with the legacy SqlCeContextGuardian is closed on TearDown.
2012-12-15 10:33:29 +05: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
a9cb337a96
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.
2012-12-14 08:06:32 +05:00
Morten Christensen
e71a5fd5eb
Fixing an issue with the MediaService.
...
Making the two UOW Providers public, so they can be used for newing up services.
Adding a few constructor options to the PP UOW Provider to avoid config lookup.
2012-12-12 09:00:00 -01:00
Shannon Deminick
1e41db6d69
Removed any manual instantiation of PetaPocoUnitOfWork as this should generally always
...
be done by the PetaPocoUnitOfWorkProvider to ensure that for a UOW it always uses a new database
instance, not a shared one.
2012-12-12 06:08:03 +05:00
Shannon Deminick
a3938edde2
Changed the PetaPocoUnitOfWorkProvider to ensure that a new Database object is used for each new
...
unit of work (transaction). When the UOW is diposed, the database instance will also be disposed.
2012-12-12 05:57:52 +05:00
Shannon Deminick
1132547c24
Changed required Database references to UmbracoDatabase
2012-12-12 05:48:18 +05:00
Shannon Deminick
6ac2db9497
removed database factory, changed audit trail stuff to internal, not sure it needs to be public.
2012-12-12 00:17:59 +05:00
Shannon Deminick
feff68ada8
Refactor new Services for thread safety, plus unit tests. Not all services are updated to be correct, only the
...
ContentService, the rest need to be updated as well.
2012-12-11 12:03:36 +05:00
sitereactor
9b77eefb4c
Adding stragies plus tests for publishing and updating the xml cache.
2012-11-06 15:17:58 -01:00
sitereactor
b77beb386a
Adding unit tests for the two repository-backing cache providers
2012-11-05 09:29:29 -01:00
sitereactor
d3655fd726
Making BaseDatabaseFactoryTest single threaded.
...
Refactoring while testing ContentService.
2012-10-30 19:27:47 -01:00
Morten@Thinkpad-X220
e42865ef9d
Adds Unit of Work for working with files U4-975
2012-10-08 10:16:59 -02:00
Morten@Thinkpad-X220
660ecfa91b
Refactoring Unit Of Work, adding TransactionTypes and a new Repository structure.
...
Adding new Factory structure.
Related to U4-973, U4-955 and U4-979
2012-10-08 08:42:57 -02:00
Morten@Thinkpad-X220
ca6356170c
Adds Repository Resolver and backing config section implementation U4-988
...
Will need a bit of refactoring because of the way UnitOfWork is currently implemented.
2012-10-05 12:59:59 -02:00
Morten@Thinkpad-X220
590bc23ef6
Minor refactorings - Using GlobalSettings for database connectionstring.
2012-10-05 12:36:59 -02:00
Morten@Thinkpad-X220.ab-nat1.dk
fe7d57ce12
Refactoring Unit of Work and its dependency on the datastore.
...
Removing legacy test project from solution.
2012-10-04 18:19:46 -02:00
Morten@Thinkpad-X220
145cddbcb6
Adds the foundation for the repository implementation with abstract Repository, Unit Of Work and Cache provider.
...
Adding the Query object implementation.
Adds the ModelDtoMapper, which is still a WIP.
Adds the initial implementation of the IContentRepository with dependencies.
2012-10-04 13:44:02 -02:00