Step 2 of 5: Adding a Doman Service Class

In this step, you'll add a domain service class to the project and connect it to the Categories table of the data source.

1.   Right-click the Web project in the Solution Explorer and select Add | New Item.

2.   Under Installed Templates choose the Web category, select DomainServiceClass and click Add.

3.   In the Add New Domain Service Class dialog box, make sure that the Entity Data Model that you just created is selected as the available DataContext class. If it is not available, go back and build the solution.

4.   Check the entity types (tables) you want to use on the client, for this example choose Category, and click OK.

 

 

5.   Build the solution. This will add the domain service class to both the Web and the client projects. To see it in the client project, select the client Silverlight project in the Solution Explorer and click ShowAllFiles on the Solution Explorer toolbar. The domain service code is in the Generated_Code folder.


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.