Using the Templates

The following section will cover how to use the various templates that ship with CSLA.

Please see the Getting Started section for steps on how to configure and use the templates within seconds.

Manual Generation

Use the following steps to get started using the CSLA templates if you are not planning on using the QuickStart template.

This is useful when you are wanting to add CSLA to an existing or new project.

  1. Create a new Class Library project in Visual Studio.
  2. Add a new CodeSmith Generator Project file to the Visual Studio project.
  3. Add a new Output to the project file for the Entities.cst template.
    1. In the Visual Studio Solution Explorer, right click the Generator Project File you added to the project in step 2.
    2. Click on the Add Output menu item.
    3. Choose the Entities.cst template in the Add Output dialog and click the OK button.
  4. Required only If you are using the Object Factory Data Access Implementation.
    1. Follow steps 1-2. 
    2. Add a new Output to the project file for the DataAccessLayer\DataAccessLayer.cst template.
  5. Finally, Generate the Outputs
    1. In the Visual Studio Solution Explorer, right click the Generator Project File you added to the project in step 2.
    2. Click on the Generate Outputs menu item.