NEW
- updated generation files as per trunk 2013 Jun 10
- Added unit tests project
- Updated to Csla 4.5.30
What is the DeepLoad/DeepData feature?
Since Encapsulated Invoke doesn't support DataSets, this sub-project started life as an alternative way to load deep data structures. The DeepLoad sample/test project was started as a way to make sure the generated code behaves like it should.The sample covers the following scenarios:
- ParentLoad and SelfLoad
- Editable and ReadOnly objects
- hard delete and soft delete
- root is a collection
- root is an object
The sample covers three application models:
- Encapsulated Implementation (single assembly for each scenario that includes the business and data access layers)
- Encapsulated Invoke using a Data Reader (3 assemblies for each scenario: business layer, DAL interface and data acess layer)
- Encapsulated Invoke using Data Transfer Objects aka DTO (3 assemblies for each scenario: business layer, DAL interface and data acess layer)
How can I use it?
If you don't care about CslaGenFork, you can download the VS solutions and have a look at how it's done.What's in the sample?
The test code only tests the loading part. The sample has 6 levels of hierarchical data (6 hierarchical selects). This sample uses dummy hierarchical data from continents to city roads. The first release used non-intuitive names both on tables and Csla objects like Level1, Level111, etc. The database and VS projects were refactored so table and object names are meaningful and reflect the hierarchy:- Continent
- Sub-continent
- Country
- Region (or state)
- City
- City road
The sample includes:
- Database scripts and files
- CslaGenFork XML files for generating the sample (using trunk files as of 26 Jan 2013)
- Generated SProcs
- VisualStudio 2010 solution with 10 projects:
- DeepLoadConsole (console application)
- DeepLoadUnitTests (unit test to run with ReSharper or any sequential test runner)
- ParentLoad.Business (library generated by CGF)
- ParentLoadRO.Business (library generated by CGF)
- SelfLoad.Business (library generated by CGF)
- SelfLoadRO.Business (library generated by CGF)
- ParentLoadSoftDelete.Business (library generated by CGF)
- ParentLoadROSoftDelete.Business (library generated by CGF)
- SelfLoadSoftDelete.Business (library generated by CGF)
- SelfLoadROSoftDelete.Business (library generated by CGF)
- VisualStudio 2010 solution for DAL DataReader, with 26 projects. Just like the previous solution, but each use scenario has 3 different assemblies: business, DAL interface and DAL for SQL Server.
- VisualStudio 2010 solution for DAL Data Transfer Object, with 26 projects. Just like the previous solution, but each use scenario has 3 different assemblies: business, DAL interface and DAL for SQL Server.
Note - On this sample, every object name is prefixed by a number (A01, etc). This number is used only for making each object's name unique across all projects of the solution.