By default, the QuickStart will automatically open the generated Visual Studio solution. If this does not happen, you will need to open the generated solution. The solution will be located in the directory you specified in the QuickStart's Location property.
Once the generated Visual Studio solution is opened, you will need to build the solution to see the generated code as shown in the image below.
CodeSmith Generator uses the Entities.csp Generator Project File (CSP) to generate code for your project. This file is created by the QuickStart with all of your information pre-populated from the previous step. Generator is smart enough to figure out if you have already configured the Entities CSP file. If you haven't, Generator will automatically try to resolve the correct business object types (E.G., Criteria, EditableRoot, EditableRootList...) to generate based off of your database relationships. The generated code will be separated into multiple folders.
|Collections||Contains all non-collection business object types.|
|Commands||Contains the data access implementation.|
|Criteria||Contains properties, factory methods and required rules.|
|Entities||Contains all non-collection business object types.|
|Utility||Contains any utilities classes that may be used by the generated code.|
If you are using Visual Basic, then you will have to click the Show All files button in the Solution Explorer to see the partial classes
For the simplicity of this walk through, I'll choose to talk about the Category business object. The Category business object is shown in the image above. As you might have noticed, there are multiple files for the Category business object. These files are called partial classes, which allows us to separate the different responsibilities of a business object.
|Partial Class File Name||Editable||Description|
|Category.cs||Yes||Contains all of your custom code.|
|Category.DataAccess.cs||No||Contains the data access implementation.|
|Category.Generated.cs||No||Contains properties, factory methods and required rules.|
If you are generating Object Factory support, then the DataAccess partial class will not be generated.
Partial classes allow for quick Silverlight Integration. All you need to do is add a project item link to the business object partial classes while executing the DataAccess partial class.
In the next step, we will cover how to configure Category's business object type.
Next: Configuring Business Object Types