I am going to use Northwind Database as my Data source
ED conceptual model of Northwind database.
Here is the list of Northwind ED exposed as data collections in ATOM based . now we can access each collection as URI
for example.
http://localhost:53133/NWebDataService.svc/Customers - To access customers data
http://localhost:53133/NWebDataService.svc/Orders -To access Orders data.
Now we are going to add few service Operations into existing Data service. to add Service operations we need to use WCF 3.5: WebGet Attribute.
Here I added two service Operations GetCustomerbyCity , GetOrdersByCustomerId as shown below.
Now we are able to browse the Methods as shown below.
http://localhost:53133/NWebDataService.svc/GetOrdersByCustomerId?customerId='ALFKI'
Thanks
SreenivasaRagavan
No comments:
Post a Comment