
Introduction
With OData services established, it is also quite important to find a simple and efficient means to consume the data from services. Since OData protocol is based on web standards such as HTTP, XML, and JSON, it is quite convenient for various programming platforms to build client applications that can consume OData services. For example, you can simply launch a web browser to explore an OData service, which will return data in the AtomPub format; you can also use the .NET WebRequest class to communicate with an OData service via a raw HTTP request/response. In more complicated situations, we can use the OData client SDK or GUI tools (such as the WCF Data Service client library and Visual Studio IDE) to generate a strong-typed client proxy to access OData service.
In this chapter, we will cover several cases of accessing OData services in client applications. We will start with some very basic OData client access approaches such as using a web browser, strong-typed client proxy classes, and raw WebRequest class. Then, we will dig into some more detailed OData client access scenarios such as editing and updating OData entity sets, asynchronous OData programming pattern, using built-in OData query options and server-side paged entity sets manipulation. In addition, some more complicated OData access cases such as consuming OData in Gzip compressed format, accessing an OData service in unmanaged clients are also covered at the end of this chapter.