2013年3月10日 星期日

WCF DataService

WCF Data Services allow you to expose and work with data by using the Open Data Protocol (OData). Data is exposed over REST-based services to allow for standard HTTP GET and POST requests. The data can be accessed based on a URL and standard query string formats for accessing tables and filtering data. These formats allow access from any client that can receive XML or JSON message notations.

使用 OData 語法查詢資料

只要送出以下需求,就可以依客戶ID取得客戶資料
http://localhost:53908/WcfDataSrv-cs/NwdDataService.svc/Customers('ALFKI')

You must turn off the feed reader view in Windows Internet Explorer to see the actual XML (Tools | Internet Options | Content | Feeds And Web Slices Settings).

沒有留言:

張貼留言