OData
Create and consume RESTful APIs in a simple and standard way
Latest posts
WCF Data Service 5.1.0-rc2 Released
Today we are releasing refreshed NuGet packages as well as an installer for WCF Data Services 5.1.0-rc2. This RC is very close to complete. We do still have a few optimizations to make in the payload, but this RC is very representative of the final product. The RC introduces several new features: The new JSON serialization format We’ve blogged a few times about the new JSON serialization format. We think this new format has the feel of a custom REST API with the benefits of a standardized format. What does that mean exactly? The feel of a custom REST API If you were to create a custom REST API,...
WCF Data Service 5.0.2 Released
We’re happy to announce the release of WCF Data Services 5.0.2. What’s in this release This release contains a number of bug fixes: Getting the release The release is only available on NuGet. To install this prerelease NuGet package, you can use the Package Manager GUI or one of the following commands from the Package Manager Console: Our NuGet package ids are: Call to action If you have experienced one of the bugs mentioned above, we encourage you to try out these bits. As always, we’d love to hear any feedback you have! Bi...
OData 101: Bin deploying WCF Data Services
TL;DR: If you’re bin-deploying WCF Data Services you need to make sure that the .svc file contains the right version string (or no version string). The idea for this post originated from an email I received yesterday. The author of the email, George Tsiokos (@gtsiokos), complained of a bug where updating from WCF Data Services 5.0 to 5.0.1 broke his WCF Data Service. Upon investigation it became clear that there was an easy fix for the short-term, and perhaps something we can do in 5.1.0 to make your life easier in the long-term. What’s Bin Deploy? We’ve been blogging about our goals for bin deploying applicat...
OData 101: Using the [NotMapped] attribute to exclude Enum properties
TL;DR: OData does not currently support enum types, and WCF Data Services throws an unclear exception when using the EF provider with a model that has an enum property. Mark the property with a [NotMapped] attribute to get around this limitation. In today’s OData 101, we’ll take a look at a problem you might run into if you have an Entity Framework provider and are using Entity Framework 5.0+. The Problem The problem lies in the fact that Entity Framework and WCF Data Services use a common format to describe the data model: the Entity Data Model (EDM). In Entity Framework 5.0, the EF team made some modificatio...
OData 101: Building our first OData-based Windows Store app (Part 2)
Download the sample code In the previous blog post, we walked through the steps to build an OData-enabled client using the new Windows UI. In this blog post, we’ll take a look at some of the code that makes it happen. ODataBindable, SampleDataItem and SampleDataGroup In the walkthrough, we repurposed SampleDataSource.cs with some code from this gist. In that gist, ODataBindable, SampleDataItem and SampleDataGroup were all stock classes from the project template (ODataBindable was renamed from SampleDataCommon, but otherwise the classes are exactly the same). ExtensionMethods The extension methods class cont...
OData 101: Building our first OData-based Windows Store app (Part 1)
Download the sample code In this OData 101 we will build a Windows Store app that consumes and displays movies from the Netflix OData feed. Specifically, we will focus on getting data, displaying it in the default grid layout, and enabling search functionality. Because there’s a lot of details to talk about in this blog post, we’ll walk through the actual steps to get the application functional first, and we’ll walk through some of the code in a subsequent post. Before you get started, you should ensure that you have an RTM version of Visual Studio 2012 and have downloaded and installed the W...
WCF Data Services 5.0.2-rc Prerelease
We’re happy to announce that we’re ready for another public RC that includes a whole bunch of bug fixes. What is in the prerelease This prerelease contains a number of bug fixes: Getting the prerelease The prerelease is only available on NuGet. To install this prerelease NuGet package, you will need to use one of the following commands from the Package Manager Console: Our NuGet package ids are: Call to action If you have experienced one of the bugs mentioned above, we encourage you to try out the prerelease bits in a preprod...
Trying out the prerelease OData Client T4 template
TL;DR We recently prereleased an updated OData Client T4 template to NuGet. The template will codegen classes for working with OData v3 services, but full support has not been added for all v3 features. What is the OData Client T4 template? The OData Client T4 template is a T4 template that generates code to facilitate consumption of OData services. The template will generate a DataServiceContext and classes for each of the entity types and complex types found in the service description. The template should produce code that is functionally equivalent to the Add Service Reference experience. The T4 template pr...
WCF Data Services 5.0.1 Released
We have just pushed the official bits for 5.0.1 to NuGet and should be releasing an updated MSI sometime within the next week. Thanks to feedback from the community we found and fixed several bugs, detailed below. NuGet Links Release Notes What does the MSI do? All of the fixes detailed above are in the NuGet bits. There is one additional fix in the MSI for code generation against services that have multiple overloads for a function import. One important nuance of the MSI is that it removes the WCF Data Services DLLs from the GAC. (The 5.0.1 MSI is an upgrade to the...