You create the following WCF Data Service:

public class Northwind : DataService<NorthwindEntities>
public static void InitializeService(DataServiceConfiguration config)
config.SetEntitySetAccessRule("Customers", EntitySetRights.AllRead);
config.SetEntitySetAccessRule("Order_Details", EntitySetRights.AllRead);
config.SetEntitySetAccessRule("Orders", EntitySetRights.AllRead);

The Customer entity includes a property named Orders that returns related Order entities.

You need to retrieve all Orders entities associated with the Customer entity with the key ALFKI.

Which URI should you use?

 Posted by Rajkatie on 9/1/2012 | Category: ADO.NET Interview questions | Views: 2931 | Points: 40
Select from following answers:
  1. http://localhost:12345/Northwind.svc/Customers('ALFKI')/Orders
  2. http://localhost:12345/Northwind.svc/Customer/ALFKI/Orders
  3. http://localhost:12345/Northwind.svc/Customers/Orders?key=ALFKI
  4. All Above

Show Correct Answer

Source: | | Alert Moderator 

Comments or Responses

Login to post response