WCF accessible via HTTP request with querystrings as parameters
I would like to create a WCF that can be invoked via a HT开发者_运维百科TP request and takes parameters in the URL.
Like:
http://someservice.svc/FetchEverything?User=xxx&category=clothes
The service should then return json in the response.
Would be thankful for advice.
Take a look at WCF Data Services. This allows you to easily expose an Entity Framework model (or part thereof) using a REST interface, or more precisely, an OData interface (= REST + AtomPub + query support).
Have a look at http://msdn.microsoft.com/en-us/library/cc668794.aspx.
精彩评论