ADO.NET DataServices 客户端类生成工具datasvcutil.exe

来源:互联网 发布:淘宝退款小二介入 编辑:程序博客网 时间:2024/06/04 19:33

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

 

 

源文档 <http://blogs.microsoft.co.il/blogs/bursteg/archive/2008/05/12/visual-studio-2008-sp1-querying-ado-net-data-service-net-client.aspx>

 

原创粉丝点击