Generating Client Side Entities with datasvcutil.exe
Open the Blog Data Service from the previous post and browse to the service (http://localhost:1039/BlogDataService.svc), just to make sure we can access the service add pull its metadata. If you want to explore the data service metadata you can add /$metadata to the url (http://localhost:1039/BlogDataService.svc/$metadata)
Open a command windows and navigate to C:/WINDOWS/Microsoft.NET/Framework/v3.5 folder. In order to generate the client classes, we use the datasvcutil.exe tool with the following command:
datasvcutil.exe /uri:http://localhost:1039/BlogDataService.svc /out:BlogEntities.cs
This command queries the metadata of the Data Service from the input uri and generates the entities code in a file called BlogEntities.cs.
Microsoft (R) DataSvcUtil version 3.5.0.0
Copyright (C) 2008 Microsoft Corporation. All rights reserved.
Writing object layer file...
Generation Complete -- 0 errors, 0 warnings