Free Sample
+ Collection

OData Programming Cookbook for .NET Developers

Steven Cheng

70 fast-track, example-driven recipes with clear instructions and details for OData programming with .NET Framework with this book and ebook.
RRP $29.99
RRP $49.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781849685924
Paperback376 pages

About This Book

  • Master OData programming concepts and skills by implementing practical examples and apply them in real-world scenarios
  • Find simple and handy means to resolve common OData programming issues more effectively
  • Explore the new OData programming features in latest and future versions of WCF Data Service
  • Well-designed recipes that are organized in complete categories such as server-side programming, client-side programming, hosting and configuration, and security

Who This Book Is For

If you are a .NET developer and you want to learn how to use OData in real-world data access application development, then this book is for you. To follow the recipes you will need to be comfortable with .NET Framework, Visual Studio IDE, C# language, and the basics of web programming like HTTP, XML, JSON.

Table of Contents

Chapter 1: Building OData Services
Building an OData service via WCF Data Service and ADO.NET Entity Framework
Building an OData service with WCF Data Service and LINQ to SQL
Exposing OData endpoints from WCF RIA Service
Adding custom operations on OData service
Exposing database stored procedures in WCF Data Service
Using custom data objects as the data source of WCF Data Service
Using Interceptors to customize a WCF Data Service
Accessing ASP.NET context data in WCF Data Service
Creating a custom WCF Data Service provider
Chapter 2: Working with OData at Client Side
Exploring an OData service through web browser
Using Visual Studio to generate strong-typed OData client proxy
Generating OData client proxy via DataSvcUtil.exe tool
Editing and deleting data through WCF Data Service client library
Accessing OData service via WebRequest class
Executing OData queries in an asynchronous manner
Filtering OData query results by using query options
Dealing with server-side paged entity sets from WCF Data Service
Performing WPF data binding with OData service data
Injecting custom HTTP headers in OData requests
Consuming HTTP compression enabled OData service
Using MSXML to consume OData service in unmanaged applications
Chapter 3: OData Service Hosting and Configuration
Hosting a WCF Data Service in IIS server
Hosting a WCF Data Service in Console application
Deploying a WCF Data Service on Windows Azure host
Configuring WCF Data Service to return error details
Applying basic access rules on WCF Data Service
Getting rid of .svc extension by using ASP.NET URL Routing
Enabling dynamic compression for OData service hosted in IIS 7
Chapter 4: Using OData in Web Application
Building data-driven ASP.NET Web Form pages with OData
Adopting OData in ASP.NET MVC web applications
Building ASP.NET Page UI with OData and XSLT
Building AJAX style data-driven web pages with jQuery
Consuming OData service with datajs script library
Using OData service in Silverlight data access application
Consuming WCF Data Service in PHP pages
Chapter 5: OData on Mobile Devices
Accessing OData service with OData WP7 client library
Consuming JSON-format OData service without OData WP7 client library
Creating Panorama-style, data-driven Windows Phone applications with OData
Using HTML5 and OData to build native Windows Phone application
Accessing WCF Data Service in Android mobile application
Accessing WCF Data Service in iOS application
Chapter 6: Working with Public OData Producers
Getting started with Netflix OData online catalog
Manipulating Sharepoint 2010 documents through OData endpoint
Using OData protocol for Windows Azure Table storage access
Query StackOverflow forums data with OData endpoint
Tracking information of NuGet packages through OData feeds
Exploring eBay online products catalog through OData service
Consuming SSRS 2008 R2 report through OData feed
Chapter 7: Working with Security
Applying Windows authentication for OData service
Chapter 8: Other OData Programming Tips
Using LINQPad to compose OData query code
Exploring OData service with ODataExplorer
Using OData service in Windows PowerShell script
Exploring OData service with Microsoft Excel PowerPivot component
Inspecting OData HTTP traffic through Fiddler web debugger
Using Open Data Protocol Visualizer to inspect the object model of OData service
Consuming OData service in Windows 8 Metro style application
Chapter 9: New Features of WCF Data Service 5.0 (OData V3)
Upgrading existing OData service to WCF Data Service 5.0
Using geospatial types in OData service
Using Any and All operators to filter OData entities
Updating OData entities through HTTP PATCH requests
Resolving base URI of OData entity sets dynamically
Exposing binary data on OData entity with Named Resource Stream
Extending OData service functionalities with Service Actions

What You Will Learn

  • Build OData service with relational database
  • Create OData service with custom data sources
  • Consume OData service with strong-type service proxy
  • Access OData service by sending raw HTTP requests
  • Use query options to perform advanced OData service query
  • Apply dynamic HTTP compression for IIS hosted OData service
  • Host OData service with Windows Azure Cloud platform
  • Use JQuery for OData service query in AJAX web application
  • Access OData service in Window Phone 7 applications
  • Manipulate document library in Sharepoint 2010 sites through OData endpoint
  • Secure OData service with ASP.NET Forms authentication
  • Work with binary data stream in OData service

In Detail

Odata (Open Data Protocol) is a Web protocol for querying and updating data that provides a way to unlock your data and free it from silos that exist in applications today. OData enables data access among a variety of applications, services, and stores by adopting existing Web technologies such as HTTP, XML, and JSON. This book deals with common OData programming cases over the Microsoft .NET Framework platform and eases the learning curve for a .NET developer to start incorporating OData in data service development.

This book provides a collection of recipes that help .NET developers to get familiar with OData programming in a quick and efficient manner. The recipes cover most OData features from the former ADO.NET Data Service to the current WCF Data Service platform. In addition, all the sample cases here are based on real-world scenarios and issues that .NET developers might come across when programming with OData in application development.

This book will be your handy guide with basic to advanced walkthroughs of common OData programming cases for the Microsoft .NET Framework platform. You will learn quick solutions to necessary tasks to integrate the power of OData at both server-side and client-side.

This book will help you master the use of OData with .NET Framework by taking you through hands-on and practical recipes. It starts by talking about the common means for building OData services and consuming OData services in client applications. Then, some more specific topics like hosting, configuration and security are discussed. The book also covers many popular and interesting topics such as integrating OData in web applications, and developing data-driven mobile applications with OData. Moreover, you can also find quite a few recipes discussing real-world OData producers and new features in latest and future versions.

Within "OData Programming Cookbook for .NET Developers", all the recipes are selected based on real-world scenarios that you will commonly come across. Each recipe covers a specific topic, going from the description of the problem, through a conceptual solution, to a solution containing sample code. By following these recipes, you can acquire how to program with OData in a simple, effective, and easy manner.


Read More