Which URL should you use for the query?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create a Windows Communication
Foundation (WCF) Data Services service. You deploy the service to the following URL: http://contoso.com/Northwind.svc.
You want to query the WCF Data Services service to retrieve a list of customer objects.

You need to ensure that the query meets the following requirements:
* Only customers that match the following filter criteria are retrieved: City=”Seattle” AND Level > 200.
* Data is sorted in ascending order by the ContactName and Address properties.
Which URL should you use for the query?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create a Windows Communication
Foundation (WCF) Data Services service. You deploy the service to the following URL: http://contoso.com/Northwind.svc.
You want to query the WCF Data Services service to retrieve a list of customer objects.

You need to ensure that the query meets the following requirements:
* Only customers that match the following filter criteria are retrieved: City=”Seattle” AND Level > 200.
* Data is sorted in ascending order by the ContactName and Address properties.
Which URL should you use for the query?

A.
http://contoso.com/Northwind.svc/Customers?City=Seattle & Level gt 200 & $orderby=ContactName,Address

B.
http://contoso.com/Northwind.svc/Customers?City=Seattle & Level gt 200 & $orderby=ContactName and Address

C.
http://contoso.com/Northwind.svc/Customers?$filter=City eq ‘Seattle’ and Level gt 200 & $orderby=ContactName,Address

D.
http://contoso.com/Northwind.svc/Customers?$filter=City eq ‘Seattle’ and Level gt 200 & $orderby=ContactName and Address

Explanation:
CHAPTER 7 WCF Data Services
Lesson 1: What Is WCF Data Services?
Working with Filters (page 474)

Accessing the Service from a Web Browser (WCF Data Services Quickstart)
(http://msdn.microsoft.com/en-us/library/dd728279.aspx)

Accessing Data Service Resources (WCF Data Services)
(http://msdn.microsoft.com/en-us/library/dd728283.aspx)



Leave a Reply 0

Your email address will not be published. Required fields are marked *