In this article I will explain how to consume ODataService in Visual Studio LightSwitch 2012.
What is OData? OData is a standardized protocol for creating and consuming data APIs. OData builds on core protocols like HTTP and commonly accepted methodologies like REST. The result is a uniform way to expose full-featured data APIs. For more info read http://www.odata.org/.Getting Started
Now click on "Attach to external Data Source" and select ODataService and click the "Next" button.Image 1.Now enter the connection information and specify the OData service endpoint and click the "Next" button.Image 2.Right now I am using a default OData service.<service xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns="http://www.w3.org/2007/app"xml:base="http://services.odata.org/OData/OData.svc/"><workspace><atom:title>Default</atom:title><collection href="Products"><atom:title>Products</atom:title></collection><collection href="Categories"><atom:title>Categories</atom:title></collection><collection href="Suppliers"><atom:title>Suppliers</atom:title></collection></workspace></service>Now choose your entities and click "Finish".Image 3.This is the designer:Image 4.Now add a screen and select a service name from the screen data.Image 5.Now finally run the application to see the product list.Image 6.
Printing in C# Made Easy