Under the covers of RIA services
At compile time, Visual Studio 2010 looks at the exposed entities and methods in the domain services. It uses the server-side code to generate the client-side code that can automatically interact with the server. To see this generated code, follow these steps:
1. In Visual Studio 2010, expand the WorkplaceApplication project in the Solution Explorer.
2. Click on Show All Files. This will show all of the hidden files that are used by Visual Studio. Expand the Generated_Code folder. Inside, there should be a file named WorkplaceApplication.Web.g.cs, as shown in the following screenshot:
3. Open
WorkplaceApplication.Web.g.cs
. This file is generated automatically by the link to the RIA Service. Inside, there are definitions ofDivision
andEmployee
classes. There is also a lot of code dedicated to the automatic connecting to the RIA Service, tracking changes to the entities, and so on.4. Right-click on the WorkplaceApplication project and select Properties. The...