OData

Create and consume RESTful APIs in a simple and standard way

Latest posts

Announcing ASP.NET Core OData 10.0.0 Preview 1
Nov 27, 2025
Post comments count 2
Post likes count 1

Announcing ASP.NET Core OData 10.0.0 Preview 1

Samuel Wanjohi
Samuel Wanjohi

We're thrilled to announce the release of ASP.NET Core OData 10.0.0 Preview 1, a major modernization update that embraces .NET's native and types! This release upgrades to .NET 10.0 and replaces OData's proprietary and CLR wrapper types with .NET's native structs. What's Changed Framework & Dependency Updates .NET 10.0 Support ASP.NET Core OData now targets .NET 10.0, taking advantage of the latest runtime performance improvements and language features. OData Library 9.x and Model Builder 3.x Integration This release updates OData dependencies to align with the latest OData .NET ecosystem: ...

Announcing OData Model Builder 3.0.0 Preview 1 Release
Nov 26, 2025
Post comments count 0
Post likes count 1

Announcing OData Model Builder 3.0.0 Preview 1 Release

Samuel Wanjohi
Samuel Wanjohi

We're excited to announce that OData Model Builder 3.0.0 Preview 1 has been officially released and is available on NuGet: This is a major release that brings the library up to date with the latest .NET and OData ecosystem, featuring .NET 10 support, OData Library 9.x compatibility, and modernized date/time handling using native .NET types. What's New in OData Model Builder 3.0.0 Preview 1 Framework & Dependency Updates .NET 10 Support OData Model Builder now targets .NET 10, aligning with the latest .NET runtime and taking advantage of modern performance improvements and language features. The l...

Announcing OData .NET (ODL) 9 Preview 3 Release
Nov 21, 2025
Post comments count 0
Post likes count 2

Announcing OData .NET (ODL) 9 Preview 3 Release

John Gathogo
John Gathogo

We’re happy to announce that OData .NET (ODL) 9 Preview 3 has been officially released and is available on NuGet: What’s New in OData .NET (ODL) 9 Preview 3 The OData .NET (ODL) 9.0.0 Preview 3 introduces a set of important changes and cleanup efforts to modernize the library, align with .NET’s evolving runtime, and simplify the OData developer experience. Below, we’ll go through the notable changes included in this release. Use for Action Queries Returning a Single Item Summary We updated to avoid throwing an exception when an action returns no result. The and methods now choose ...

Announcing a new OData.NET serializer
Oct 7, 2025
Post comments count 3
Post likes count 2

Announcing a new OData.NET serializer

Clément Habinshuti
Clément Habinshuti

One of the major, recurring complaints of the OData.NET libraries is the performance overhead of the serialization stack. We have done a lot of work to improve the serialization performance, but the existing architecture limits how far we can go. For this reason, we have started work on a new serialization stack for OData.NET libraries that addresses major performance concerns and also makes general improvements to usability. We plan to ship this new serializer as part of 9.x library (the next major release) under a new namespace as an alternative to the existing and . But you don't have to wait for 9.x rel...

Enable OData functionalities on ASP.NET Core Minimal API
Oct 7, 2025
Post comments count 0
Post likes count 1

Enable OData functionalities on ASP.NET Core Minimal API

Sam Xu
Sam Xu

Introduction Minimal API is a simplified approach for building HTTP APIs fast within ASP.NET Core, compared to the controller-based APIs. Developers can build fully functioning REST endpoints with minimal code and configuration, especially without controller, action and even the formatters. See ASP.NET Core Minimal API details at here. Since Microsoft.AspNetCore.OData version 9.4.0, it enables developers to achieve OData functionalities on ASP.NET Core minimal APIs. In this post, I’d like to go through the basics of enabling OData functionalities on a Minimal API application. Let’s get started. Prerequisites...

OData .NET (ODL) 9 Preview Release
Aug 22, 2025
Post comments count 0
Post likes count 0

OData .NET (ODL) 9 Preview Release

John Gathogo
John Gathogo

We’re happy to announce that OData .NET (ODL) 9 Preview 2 has been officially released and is available on NuGet: What’s New in OData .NET (ODL) 9 Preview 1 & 2 The OData .NET (ODL) 9.0 previews introduce a set of important changes and cleanup efforts to modernize the library, align with .NET’s evolving runtime, and simplify the OData developer experience. Below, we’ll go through the notable changes included in the first two preview releases. Targeting .NET 10 Preview ODL now builds against .NET 10 preview, ensuring compatibility with the upcoming runtime. This helps early adopte...

ASP.NET Core OData Web API Template Preview Release
Apr 28, 2025
Post comments count 0
Post likes count 4

ASP.NET Core OData Web API Template Preview Release

Samuel Wanjohi
Samuel Wanjohi

We are excited to announce the public preview release of the ASP.NET Core OData Web API Template Pack. This template helps you create an ASP.NET Core Web API project with OData support, providing a streamlined setup for .NET 8.0 and above. The following preview release is now available on NuGet: Key Features Installation To install the template, use the following command: Usage Using dotnet CLI Create a new project using the template: Using Visual Studio IDE Select Create to create the new project...

Announcing ASP.NET Core OData 9 Official Release
Aug 30, 2024
Post comments count 2
Post likes count 11

Announcing ASP.NET Core OData 9 Official Release

John Gathogo
John Gathogo

We're happy to announce that ASP.NET Core OData 9 has been officially released and is available on NuGet: The major highlight of this release is the update of the OData .NET dependencies to the 8.x major version. By updating the dependencies, we're able to take advantage of the improvements and new capabilities introduced in Microsoft.OData.Core 8.x and Microsoft.OData.Edm 8.x releases specifically. The ASP.NET Core OData 9 release will only support .NET 8 or later. The OData .NET 8 official release announcement addresses the major changes introduced in that release. It's advisable to go through t...

Announcing OData .NET 8 Official Release
Aug 12, 2024
Post comments count 2
Post likes count 1

Announcing OData .NET 8 Official Release

Clément Habinshuti
Clément Habinshuti

We're happy to announce that OData .NET 8 has been officially released and is available on NuGet: We would like to thank the community for trying out the pre-release versions and sharing feedback with us following our announcements of the previews and release candidates. This release presents an opportunity for us to modernize our stack, address some technical debt and take better advantage of investments in .NET. OData .NET 8.0.0 contains changes to improve maintainability, user experience, performance and add new capabilities.​To make adoption and upgrading to the new version smooth, we hav...

Announcing OData .NET 8 Release Candidate 1
Jul 12, 2024
Post comments count 1
Post likes count 0

Announcing OData .NET 8 Release Candidate 1

Elizabeth Okerio
Elizabeth Okerio

OData .NET 8.0 RC1 is now available, bringing numerous significant improvements to the following libraries: This is the final release candidate before the official launch of these libraries, scheduled for August 12th. Most of the planned features and changes are included in this release candidate and are ready for you to explore. In addition to the changes listed in these documents: This release includes the following updates: Some of these updates are breaking changes. Updates in Version 8.0.0-rc.1   We invite you ...

Microsoft.AspNetCore.OData 9 Preview Release
Jun 12, 2024
Post comments count 0
Post likes count 0

Microsoft.AspNetCore.OData 9 Preview Release

Elizabeth Okerio
Elizabeth Okerio

We are excited to announce the forthcoming major release of Microsoft.AspNetCore.OData, scheduled for June. In preparation for this significant update, we have made preview versions of the library available to gather early feedback from our community. The following preview release is now available on NuGet: Key Update The primary change in this release is the update of the OData core libraries dependencies to the recently released OData Core 8.0.0-preview versions. To review the breaking changes and updates made in the OData Core libraries, which we have incorporated into this release, please check t...

OData .NET 8 Preview Release
Apr 26, 2024
Post comments count 13
Post likes count 5

OData .NET 8 Preview Release

Clément Habinshuti
Clément Habinshuti

We would like to announce that we are planning a new major release of OData .NET core libraries in June. Ahead of this release, we have released preview versions of the libraries to get some early feedback from the community. Specifically, the following preview releases are now available on NuGet: It has been almost 8 years since the last major release of OData .NET core libraries. This release presents an opportunity for us to modernize our stack, address some technical debt and take better advantage of investments in .NET. To make adoption and upgrading to the new version smooth, we have op...

Deep insert support in OData client
Sep 22, 2023
Post comments count 0
Post likes count 1

Deep insert support in OData client

Kennedy Kangethe Munga
Kennedy Kangethe Munga

In the Deep insert support in OData webapi blog post, we demonstrated how to add deep insert capabilities to an OData service. In this blog post, we demonstrate how to add deep insert capabilities in OData client. In the following sections, we implement a client app. Create a Console application Install required packages In our client application, we are going to use the library that offers APIs for building deep insert requests and consuming deep insert responses. Run the following command on the Visual Studio Package Manager Console to install the  nuget package...

Working with media resources in OData – Part 2
Aug 8, 2023
Post comments count 0
Post likes count 0

Working with media resources in OData – Part 2

John Gathogo
John Gathogo

In Part 1 of this blog post, we demonstrated how to implement an OData service that serves media resources. In Part 2, we look at how to implement a client app that interacts with the OData binary large object (BLOB) feed to both retrieve and post binary data along with the metadata for the media resource. The OData BLOB feed created in Part 1 supported the following functionality: The service also exposed a single media link entry (MLE) named that is linked to a media resource (MR). In the following sections, we implement a client app to interact with that BLOB feed. Create a Con...

Working with media resources in OData – Part 1
Aug 8, 2023
Post comments count 0
Post likes count 0

Working with media resources in OData – Part 1

John Gathogo
John Gathogo

OData enables you to define data feeds that serve binary large object (BLOB) data. In OData lingo, this binary data is referred to as a media resource. A media resource (MR) is an unstructured piece of data or stream, e.g., a document, image, or video. It is requested from the data service separately from the entry in the feed to which it belongs, called a media link entry. A media link entry (MLE) is a special type of entry which links to an MR and includes additional metadata about it. Typical metadata that an MLE may maintain about the related MR include description, file name, file size, dimensions, date uplo...

Enable Un-typed within ASP.NET Core OData
Jun 19, 2023
Post comments count 0
Post likes count 1

Enable Un-typed within ASP.NET Core OData

Sam Xu
Sam Xu

Introduction The latest ASP.NET Core OData supports the following two built-in OData abstract types: Developers can use them to advertise a property in OData metadata schema (aka, Edm model) so that such property is declared with a particular name present, but there is no type associated to describe the structure of the property's values. Here's an example: Where, Data is called single value untyped property, meanwhile Infos is called collection value untyped property. Since they are untyped, in other words, there's no type limitation for the property value, developers can use any kind of val...

Deep insert support in OData Web API
Jun 9, 2023
Post comments count 0
Post likes count 0

Deep insert support in OData Web API

Kennedy Kangethe Munga
Kennedy Kangethe Munga

Background In , we added support for deep insert. In deep insert, we create an object and its related items or link existing items in a single request. This blog post is a continuation of Bulk Operations Support in OData Web API. In that blog post, we explained how to use and classes. We will not repeat that in this blog post. Bulk update and deep insert share the same and classes. In the following sections, we will cover how deep insert is implemented in and the things that the developer needs to do to use it in their OData service. Controller For the controller action to handle deep insert, the...

Enable CBOR within ASP.NET Core OData
Mar 14, 2023
Post comments count 0
Post likes count 1

Enable CBOR within ASP.NET Core OData

Sam Xu
Sam Xu

Introduction CBOR, which stands for Concise Binary Object Representation, is a data format whose design goals include the possibility of extremely small code size, small message size, and extensibility without the need for version negotiation (from cbor.io). CBOR is based on the wildly successful JSON (aka, JavaScript Object Notation) data model, and is a binary data representation of JSON. Here's an example of a simple JSON value in plain text and binary representation. OData library, by default, uses the plain text JSON representation for OData requests and response data serialization (writing) and dese...

Customize OData payload serialization format within ASP.NET Core OData
Mar 9, 2023
Post comments count 7
Post likes count 2

Customize OData payload serialization format within ASP.NET Core OData

Sam Xu
Sam Xu

Introduction JSON (aka, JavaScript Object Notation), a standard text-based format for representing structured data based on JavaScript object syntax, is the default representation for the OData requests and responses payload, see OData JSON format here. It’s a very popular format and widely used in most scenarios. However, there are customers who want to build services following OData conventions and want to get OData payload using formats other than JSON, such as CSV (aka, Comma Separated Value) format, or YAML (aka, YAML Ain't Markup Language) format, etc. OData .NET libraries are designed to empower custom...

Bulk Operations Support in OData Web API
Dec 28, 2022
Post comments count 1
Post likes count 4

Bulk Operations Support in OData Web API

Elizabeth Okerio
Elizabeth Okerio

Good news! OData Web API 7.x now supports bulk operations. Install the most recent version of OData Web API 7.x(v7.6.3) to take advantage of bulk operations. A bulk operation is one that allows you to perform multiple operations (insert, update, delete) on multiple resources (of the same type) and their nested resources (to any level) with a single request. A bulk operation can either be:   Deep Update A deep update is a patch request. The following is an example of a deep update request: How the above request will be processed: NOTE: The @odata.context annot...

Extension: Omit null value properties in ASP.NET Core OData
Sep 7, 2022
Post comments count 0
Post likes count 4

Extension: Omit null value properties in ASP.NET Core OData

Sam Xu
Sam Xu

Introduction By default, ASP.NET Core OData serializes a single value property as “null”, and a collection value property as an empty array if its value is null as such: It’s good for most scenarios. However, omitting those 'annoying' null-value properties from the OData response gets more and more attention. Along with the latest ASP.NET Core OData, it’s very easy to omit such null-value properties by extending the OData resource serializer. The approach is so common that it’s better to create a post and value more customers/developers. Let’s get started. Prerequisites As usual, my post starts with buildin...

Using the new JSON writer in OData
Aug 17, 2022
Post comments count 0
Post likes count 3

Using the new JSON writer in OData

Clément Habinshuti
Clément Habinshuti

version 7.12.2 has introduced a new JSON writer that’s based on .NET’s Utf8JsonWriter. The current JSON writer used in , internally called , is a custom implementation that uses to write the JSON output to the destination stream. We decided to write a new implementation to take advantage of the performance optimizations in . In order not to disrupt existing customers, people will have to explicitly “opt-in” to using the new writer. Currently, allows you to override the default used for writing JSON output by providing a custom to the dependency-injection container that’s attached to the message instance (...

Tutorial: Build gRPC & OData in ASP.NET Core
Apr 20, 2022
Post comments count 2
Post likes count 0

Tutorial: Build gRPC & OData in ASP.NET Core

Sam Xu
Sam Xu

Introduction gRPC (google Remote Procedure Call) is a high-performance remote procedure call framework that helps developers to build and consume remote services using the same way as calling local APIs. Different from gRPC, OData (Open Data Protocol) is an OASIS standard that defines a set of best practices for developers to build and consume RESTful APIs using HTTP request/response. Both approaches have their own strong points, for example, gRPC has less network usage with protobuf binary serialization, on the contrary, OData uses JSON as data format for human readability. In addition, OData has powerful query...

Customizing $filter for spatial data in ASP.NET Core OData 8
Feb 22, 2022
Post comments count 0
Post likes count 0

Customizing $filter for spatial data in ASP.NET Core OData 8

Kennedy Kangethe Munga
Kennedy Kangethe Munga

Background The OData URI parser parses the $filter query to a FilterClause. The translates an OData parse tree represented by a FilterClause to an Expression. The can be applied to an and passed to an ORM (e.g Entity Framework Core) for processing. The contains the default implementation on how the Expressions should be created. This creates a few issues: In this blog post, we will demonstrate how to implement support for the OData spatial built-in function. The current ASP.NET Core OData 8 doesn't support it. EF Core enables mapping to spatial data types in the database by using typ...

$compute and $search in ASP.NET Core OData 8
Jan 11, 2022
Post comments count 10
Post likes count 0

$compute and $search in ASP.NET Core OData 8

Sam Xu
Sam Xu

Introduction OData system query options, such as $filter, $orderby, are a set of query string parameters that control the amount and order of the data returned for the resource identified by the URL. In the latest version of ASP.NET Core OData, two new system query options as follows are enabled: Along with other query options, $compute or $search requests the service to perform a set of transformations at the server side to control the returned data. In this post, I will use a simple product-sale OData service to go through the $compute and $search scenarios and share ideas of how to use $compute a...

The Future of OData NxT (Neo)
Jan 4, 2022
Post comments count 6
Post likes count 1

The Future of OData NxT (Neo)

Hassan Habib
Hassan Habib

Few months ago I announced a collaboration with the OData team to start building a new version of OData that can withstand the forever changing requirements in software design and architecture. I got together with Sam Xu and we decided to kick-off a spin-off version of OData.NET that I called OData NxT (Neo) OData Neo is an attempt to reconceptualize the core capabilities of OData while maintaining the original syntax protocols published by Microsoft back in 2007. The new Implementation will fulfill the following priorities: This is OData Neo. The next generation of OData Protocol implementation for the .NET ...

Adding support for $count segment in $filter collections in OData WebAPI
Aug 26, 2021
Post comments count 1
Post likes count 0

Adding support for $count segment in $filter collections in OData WebAPI

Kennedy Kangethe Munga
Kennedy Kangethe Munga

Introduction In OData core  v7.9.0 we added improved support for $count segment in $filter collection properties. Previously, versions of OData core had support for: We are constantly improving filtering capabilities in OData WebAPI. In OData WebApi v7.5.9 and OData WebApi v8.0.2, we have added support for the queries below According to the spec only or query options can be applied to a segment. Note: For scalar primitive collections, only is applicable. For scalar complex collection, both and are supported. Prerequisites Let us create an ASP.NET Core Application using Visual Studio 201...

Support for fetching nested paths in OData Web API
Aug 26, 2021
Post comments count 0
Post likes count 0

Support for fetching nested paths in OData Web API

Clément Habinshuti
Clément Habinshuti

Background OData services use nested paths to access properties or entities related to a resource. For example, if you want to access orders of a given customer, you would use a request path like: 7.x provides two main approaches for handling such requests: convention and attribute routing. In the first approach, we create controller actions with conventional naming patterns to handle specific scenarios. For example, if you want to handle fetching the customers entity set (), you would implement a method in the that returns the collection corresponding to the entity set as follows: To retrieve...

Build formatter extensions in ASP.NET Core OData 8 and hooks in ODataConnectedService
Aug 23, 2021
Post comments count 3
Post likes count 1

Build formatter extensions in ASP.NET Core OData 8 and hooks in ODataConnectedService

Sam Xu
Sam Xu

Introduction In this post, I will create formatter extensions in an OData web service and request/response hooks in an OData client application to generate/consume ETag control information. ETag (aka entity tag), one of OData control information that may be applied to an entity or collection in response, can be used in a subsequent request to avoid overwriting if the entity or collection's value has been changed by other requests. ETag value normally can be generated using concurrency properties automatically in OData, however, I’d like to use this post to share with you the ideas of how to extend serializati...

Tutorial: Creating a Service with ASP.NET Core OData 8.0 for .NET 5
Jul 30, 2021
Post comments count 4
Post likes count 1

Tutorial: Creating a Service with ASP.NET Core OData 8.0 for .NET 5

Lisi Case
Lisi Case

In this document, we will walk through the process of creating a local service using OData 8.0, which is optimized to support ASP.NET Core 5. To learn more about the changes, check out ASP.NET Core OData 8.0 Preview for .NET 5 (which also references ASP.NET Core OData now Available), written by my colleague, Sam. You'll notice that this post has a lot of similarities; here, I'm aiming to consolidate our documentation and share my experience from the perspective of an intern new to OData. Topics Covered Software Used As always, ...

Up & Running w/ OData in ASP.NET 6
Jul 10, 2021
Post comments count 9
Post likes count 2

Up & Running w/ OData in ASP.NET 6

Hassan Habib
Hassan Habib

In this article, I'm going to walk you through the simplest way you can follow to get up and running with OData 8.0 on ASP.NET 6.0 - including source code examples, video walk-throughs and a glimpse into the future of OData.

API versioning extension with ASP.NET Core OData 8
Jul 9, 2021
Post comments count 15
Post likes count 0

API versioning extension with ASP.NET Core OData 8

Sam Xu
Sam Xu

Introduction API versioning can help evolving our APIs without changing or breaking the existing API services. URL segment, request header, and query string are three ways to achieve API versioning in ASP.NET Core application. ASP.NET Core OData 8, built upon ASP.NET Core, has the built-in API versioning functionality via route URL prefix template. For instance, the following code configures a version template in the route URL prefix to achieve URL based API versioning: Based on this configuration, it supports API versioning using URL segment as: ASP.NET Core OData 8 doesn't have the built-in ...

Attribute Routing in ASP.NET Core OData 8.0 RC
Apr 7, 2021
Post comments count 11
Post likes count 0

Attribute Routing in ASP.NET Core OData 8.0 RC

Sam Xu
Sam Xu

Introduction Attribute routing is how Web API matches the incoming HTTP requests to an action based on route template attributes decorated on controller or action. ASP.NET Core defines a set of route template attributes to enable attribute routing, such as RouteAttribute, HttpGetAttribute etc. ASP.NET Core OData 8.0 RC supports these attributes to enable you to define OData attribute routing endpoints. In this post, I would like to share details about the changes and usages of the attribute routing in OData ASP.NET Core OData 8.0 RC. The code snippets in this post are from this sample project. Please try and...

OData Connected Service 0.12.0 Release
Feb 25, 2021
Post comments count 1
Post likes count 0

OData Connected Service 0.12.0 Release

Clément Habinshuti
Clément Habinshuti

OData Connected Service 0.12.0 has been released on the Visual Studio Marketplace. This release includes the following changes:   Restored default settings Some default options were inadvertently changed in a previous update, leading to default options that do not make sense for the majority of use cases. We have restored the affected default values to more reasonable options: Visit this page to learn more about available settings and their impact on the code generation process. Support for reference models with relative URIs In previous version, you would get an...

Passing OData Query Options in the Request Body
Dec 4, 2020
Post comments count 12
Post likes count 1

Passing OData Query Options in the Request Body

John Gathogo
John Gathogo

The query options part of an OData URL can be quite long, potentially exceeding the maximum length of URLs supported by components involved in transmitting or processing the request. HTTP does not impose any limits on the length of a URL, however, many hosting environments (including IIS) impose limitations which may restrict the client's ability to request the exact set of data that they are interested in. These limitations would especially pose a big challenge for clients using explicit select statements for example. Background One way that you can go round these limitations is by wrapping the GET request in ...

Introducing the OData Web API Authorization library
Nov 16, 2020
Post comments count 1
Post likes count 0

Introducing the OData Web API Authorization library

Clément Habinshuti
Clément Habinshuti

This post introduces the Web API Authorization library which automatically enforces the permissions defined in your OData model on your Web API endpoints.

OData Connected Service 0.11.1 Release
Nov 11, 2020
Post comments count 0
Post likes count 0

OData Connected Service 0.11.1 Release

Clément Habinshuti
Clément Habinshuti

This post announces release of OData Connected Service v0.11.1 and its new features and bug fixes.

Routing in ASP.NET Core OData 8.0 Preview
Nov 2, 2020
Post comments count 10
Post likes count 1

Routing in ASP.NET Core OData 8.0 Preview

Sam Xu
Sam Xu

Introduction In the previous version of ASP.NET Core OData, such as 6.x and 7.x version, the OData routing is IRouter-based Web API Routing, that is, OData router is a Router implementing IRouter interface. Even in the ASP.NET Core OData 7.x Endpoint Routing, it is also related to the IRouter routing. Since 8.0, we want to build the OData routing really on ASP.NET Core Endpoint Routing and make the OData routing more "positive" as much as possible. In this post, we would like to share more details about the design and implementation of OData Routing in 8.0 preview. Since it's preview, we are wishfully looking...

ASP.NET Core OData 8.0 Preview for .NET 5
Oct 19, 2020
Post comments count 6
Post likes count 0

ASP.NET Core OData 8.0 Preview for .NET 5

Sam Xu
Sam Xu

Recently, OData team released the 8.0.0 preview version of ASP.NET Core OData on nuget.org. It is the first version of OData supporting .NET 5, especially for ASP.NET Core 5. This version includes some breaking changes, such as model builder separation, namespace changes and configuration changes etc. Most importantly, the routing mechanism is changed a lot comparing to the previous 7.x version. This post is intended to introduce such changes using a basic tutorial about how to build OData service through ASP.NET Core OData 8.0 preview package. Besides, we are looking for requirements of features and reports o...

Dynamic properties container property in OData Client
Sep 8, 2020
Post comments count 2
Post likes count 0

Dynamic properties container property in OData Client

John Gathogo
John Gathogo

When working with open types in an OData service, dynamic properties are held in a container property of type . However, support for a similar container property has traditionally been absent in OData client. For this reason, dynamic properties returned from an OData service could only be mapped to declared properties on the client backing type. Where the backing types are autogenerated using a code generator like OData Connected Service, the developer would augment the autogenerated class with a partial class, to avoid messing around with the autogenerated code. For instance, for a property  returned as a dyn...

All in One with OData $Batch
Jul 13, 2020
Post comments count 2
Post likes count 3

All in One with OData $Batch

Hassan Habib
Hassan Habib

Introduction We talked in the past about some of the most powerful features OData has to offer such as shaping, filtering and ordering your data all within your API request. But with an API GET request you can only do so much before you reach the maximum length of a URL which is a standard limitation. For instance, let's assume we are looking for information for a particular set of students. If the set is as little as 5 or 10 students, the request might be feasible with a simple API call such as this: But the problem with that approach is that it doesn't scale very well. For instance, if you are looking...

OData Connected Service 0.10.0 Release
May 19, 2020
Post comments count 1
Post likes count 0

OData Connected Service 0.10.0 Release

Clément Habinshuti
Clément Habinshuti

OData Connected Service 0.10.0 has been released and is available in the Visual Studio Marketplace. This release includes the following features and fixes: 1. Support for Open Types Open Types are entity or complex types in OData which have dynamic properties (i.e. properties not declared in the schema). Previously, OData Connected Service did not provide support for dynamic properties in open types. Starting with this version, if a type is marked as open in the service model, OData Connected Service will generate a dictionary called as a property of that type. The will be applied to that prop...

Exploring Graph Native Support for OData
May 17, 2020
Post comments count 3
Post likes count 0

Exploring Graph Native Support for OData

Hassan Habib
Hassan Habib

We talked in previous articles about the amount of enterprise technologies that offer OData out-of-the-box for it’s RESTFul API communications. some of these technologies are widely spread such as SharePoint, SAP, SQL Server and so many other technologies that leverage a multi-billion user powerful technology like OData. In this article, I’m going to show you how you can leverage OData with Microsoft Graph, so you can power your applications with extensive capabilities to search, sort, order and filter all users information, including calendars, security groups, mail and so much more within Microsoft Graph wit...

OData Model Builder now Available
Apr 30, 2020
Post comments count 2
Post likes count 0

OData Model Builder now Available

Sam Xu
Sam Xu

How to empower developers to build OData Edm model easily from their data model (C# classes) is one of the most important task in OData team. Today, we are pleased to announce the first beta version of OData model builder available at https://www.nuget.org/packages/Microsoft.OData.ModelBuilder. Please try this package by installing as: The basic usage of the Edm model is to use the conventional model builder, here's sample codes   For all other detail usage of the model builder, please refer to: https://docs.microsoft.com/en-us/odata/webapi/model-builder-abstract To release model builder as a si...

OData Connected Service 0.9.1 Release
Apr 30, 2020
Post comments count 0
Post likes count 0

OData Connected Service 0.9.1 Release

Elizabeth Okerio
Elizabeth Okerio

Good News! A new version of OData Connected Service is now available in the Visual Studio Marketplace. The new version adds the following new features and bug fixes/enhancements: Features Bug Fixes/Enhancements Auto-selects the last metadata endpoint used in generating proxy classes The endpoint dropdown contains a list of all the recent endpoints used in generating proxy classes as shown above. This feature auto selects the most recent endpoint used in generating proxy classes. This is important when you are working with an endpoint undergoing frequent changes and that requires...

Aggregation extensions in OData  ASP.NET Core
Apr 24, 2020
Post comments count 3
Post likes count 0

Aggregation extensions in OData ASP.NET Core

Konstantin Kosinsky
Konstantin Kosinsky

$select and $filter, as well as other OData query options, are an excellent way to receive only data that you need. However, they might not be the best option for reporting and analytical applications. If you want to get total sales to the particular customer and using only $select and $filter, you end up selecting all orders for that customer and doing aggregation client-side. This approach means sending a lot of data over the network. If you need to show sales by region, product category, you have to send almost all the data. Fortunately, OData v4.0 specification includes an aggregation extensions which allo...

OData Connected Service 0.9.0 Release
Apr 21, 2020
Post comments count 0
Post likes count 0

OData Connected Service 0.9.0 Release

John Gathogo
John Gathogo

OData Connected Service 0.9.0 has been released and is now available on Visual Studio Marketplace. This release adds the following features and bug fixes:  You can get the extension from Visual Studio Marketplace      

OData Connected Service v0.8.0 Release
Apr 9, 2020
Post comments count 0
Post likes count 0

OData Connected Service v0.8.0 Release

Kennedy Kangethe Munga
Kennedy Kangethe Munga

OData Connected Service 0.8.0 has been released and is now available on the Visual Studio Marketplace. The new version adds the following features:   There  instances where you want to re-use same configuration settings across multiple projects. Manually supplying the same settings every time you spin up a new project is redundant. This feature enables one to load code generation values to the OData Connected Service wizard from a json file. This means that you can either type these values or you can load them from a json file.  To use this feature: Create a new json file...

Move OData to .NET 5
Apr 6, 2020
Post comments count 2
Post likes count 0

Move OData to .NET 5

Sam Xu
Sam Xu

Introduction Along with the Announcing .NET 5 preview 1, it’s time to move OData to .NET 5. This blog is intended to describe how easy to move the BookStore sample introduced in ASP.NET Core OData now Available  onto .NET 5. Let's get started. Install .NET 5 .NET 5 SDK is required to build the .NET 5 application. So, Let’s follow up the instructions in Announcing .NET 5 preview 1 to install the .NET 5 SDK. Meanwhile, I also install the Visual Studio 2019 Preview to edit and compile the .NET 5 project. It's easy to download Visual Studio 2019 Preview from here. The required VS version supporting .NET 5 is...

OData Connected Service 0.7.1 Release
Mar 28, 2020
Post comments count 2
Post likes count 0

OData Connected Service 0.7.1 Release

Clément Habinshuti
Clément Habinshuti

We are pleased to announce a new release of OData Connected Service, version 0.7.1. This version adds the following important features and bug fixes: You can get the extension from the Visual Studio Marketplace. 1. VB.NET Support You can now use OData Connected Service extension to generate OData client code for Visual Basic projects. The features supported in C# are also supported in VB.NET projects. Let’s create a simple VB.NET project to demonstrate how it works. Open Visual Studio and create a VB .NET Core Console App. When the new project is ready, right-click the project node fr...

OData Connected Service version 0.6.0 Release
Mar 20, 2020
Post comments count 0
Post likes count 0

OData Connected Service version 0.6.0 Release

Elizabeth Okerio
Elizabeth Okerio

OData Connected Service 0.6.0 has been released and is available in the Visual Studio Marketplace. The new version adds the following features: Custom Http Headers  This feature allows you to add headers that will be sent with the request that fetches the metadata used in generating proxy files. This is actually important when using protected metadata to generate proxy files. To access the metadata endpoint, you may be required to pass authorization headers as shown below. These values are not stored within the OData Connected Service or in your computer and you are required to provide them a...

OData Connected Service version 0.5.0 Release
Mar 17, 2020
Post comments count 0
Post likes count 0

OData Connected Service version 0.5.0 Release

Elizabeth Okerio
Elizabeth Okerio

OData Connected Service 0.5.0 has been released and is available in the Visual Studio Marketplace. The new version has the following new features: In addition to the above features, the new version has the following improvements and fixes: Microsoft.OData.Client v7.6.3 OData Connected Service version 0.5.0 comes with Microsoft.OData.Client v7.6.3 which has great improvements: Some of the improvements are:  Supports Mocking of the generated functions and properties The generated methods and properties can be mocked for purposes of tes...

OData Connected Service 0.4.0 Release
Mar 6, 2020
Post comments count 2
Post likes count 0

OData Connected Service 0.4.0 Release

Clément Habinshuti
Clément Habinshuti

OData Connected Service 0.4.0 has been released and is now available on the Visual Studio Marketplace. The new version adds the following features: In this article, I would like to take you through some key new features and get you up to speed with using the OData Connected Service. OData Connected Service in Visual Studio 2019 We start by illustrating how you can use the extension in Visual Studio 2019. Open Visual Studio 2019 and create a new C# .Net Core Console project. Let’s call the project "SampleClient", and the solution "OCSTest". Once the project is open, click the Extensions menu,...

Migrating OData V3 Services to OData V4 without Disrupting Existing Clients
Mar 4, 2020
Post comments count 0
Post likes count 1

Migrating OData V3 Services to OData V4 without Disrupting Existing Clients

Feng Xie
Feng Xie

The migration from your existing OData V3 services to V4 can be challenging if there are some clients that cannot be easily upgraded, like the ones running on on-premises resources. The OData V3 services will need to be kept running until the old clients have been phased out, incurring maintenance overhead. OData team recently released an extension to overcome the challenge. This extension eases the transitioning by enabling OData V4 services to serve OData V3 requests. The advantage is that no changes are needed on the OData V3 clients while the OData V3 services are migrated to OData V4. In this article, I a...

Enabling Endpoint Routing in OData
Mar 4, 2020
Post comments count 42
Post likes count 0

Enabling Endpoint Routing in OData

Hassan Habib
Hassan Habib

Few months ago we announced an experimental release of OData for ASP.NET Core 3.1, and for those who could move forward with their applications without leveraging endpoint routing, the release was considered final, although not ideal. But for those who have existing APIs or were planning to develop new APIs leveraging endpoint routing, the OData 7.3.0 release didn't quiet meet their expectations without having to disable endpoint routing. Understandably this was quite a trade off between leveraging the capabilities of endpoints routing versus being able to use OData. Therefore in the past couple of months t...

Integrating Cosmos DB with OData (Part 3)
Jan 5, 2020
Post comments count 1
Post likes count 1

Integrating Cosmos DB with OData (Part 3)

Hassan Habib
Hassan Habib

Sometimes requiring to build an entire ASP.NET Core application just for the purpose of exposing a RESTFul API endpoint to give your API consumers the ability to query, filter and order the data could be a bit of an overhead, especially if you are not planning on adding in any additional business logic between your data and it's consumers. It's not also a very cost effective solution when it comes to the development effort, maintenance, infrastructure and all the bells and whistles that accompany developing a custom ASP.NET Core API. If that's the case for your task, Cosmos DB offers native support for ODat...

$select Enhancement in ASP.NET Core OData
Dec 30, 2019
Post comments count 4
Post likes count 0

$select Enhancement in ASP.NET Core OData

Sam Xu
Sam Xu

The release of ASP.NET Core OData v7.3 brings a ton of improvements to $select functionality. In this article, I’d like to introduce some of the new features of $select and its usages in combination with other query options like $filter, $top, $skip, $orderby, $count and $expand. This tutorial assumes that you already have the knowledge to build an ASP.NET Core Web Application service using ASP.NET Core OData NuGget package. If not, start by reading ASP.NET Core OData now Available and refer to the sample project used in this article. Let’s get started. Data Model As mentioned, we are going to skip the steps ...

Experimenting with OData in ASP.NET Core 3.1
Dec 21, 2019
Post comments count 27
Post likes count 0

Experimenting with OData in ASP.NET Core 3.1

Hassan Habib
Hassan Habib

A lot of developers have asked me recently about OData compatibility with ASP.NET Core 3.0 and again with .NET Core 3.1 after it’s very recent release. This demand became more and more critical with the recent announcement from the .NET team around .NET Core 2.2 reaching the end of its life on Dec 23rd of this year. And because of all of that, the OData team at Microsoft have been working diligently in the last few months to ensure a stable release of OData that supports .NET Core 3.1 makes it out to the public as soon as possible. And while the final release might take a bit longer to be production-read...

Optimizing Web Applications with OData $Select
Oct 25, 2019
Post comments count 6
Post likes count 0

Optimizing Web Applications with OData $Select

Hassan Habib
Hassan Habib

OData as an API technology comes in with so many options that gives API consumers the power to shape, filter, order and navigate through the data with very few lines of code. In my previous articles I talked in details about how to enable OData on your existing ASP.NET Core API using the EDM model, in addition to that I have provided a code example for you to be able to test the capabilities of OData on your own machine. In this article, I suggest you keep the very same source code handy to learn more about one of the most powerful query options of OData, which is $select Introduction to OData $Select O...

Customize Control Information for full metadata requests in odata.net
Aug 12, 2019
Post comments count 1
Post likes count 0

Customize Control Information for full metadata requests in odata.net

Kanish Manuja
Kanish Manuja

Background OData supports three metadata levels for the JSON format, namely - No Metadata as the name suggests does not include control information other than nextLink and count. Minimal metadata responses usually include context, etag, deltalink etc. whereas full metadata responses contain all the control information like navigationLink, assciationLink, readLink, mediaReadLink etc. ODataMetadataSelector With odata.net >=7.6.1, it will be possible to customize what metadata gets written out. A new class, ODataMetadataSelector is introduced which exposes methods that can be overridden to add...

Using SkipToken for Paging in Asp.Net OData and Asp.Net Core OData
Aug 7, 2019
Post comments count 3
Post likes count 0

Using SkipToken for Paging in Asp.Net OData and Asp.Net Core OData

Kanish Manuja
Kanish Manuja

Loading large data can be slow. Services often rely on pagination to load the data incrementally to improve the response times and the user experience. Paging can be server-driven or client-driven: Client-driven paging In client-driven paging, the client decides how many records it wants to load and asks the server for that many records. That is achieved by using $skip and $top query options in conjunction. For instance, if a client needs to request 10 records from 71-80, it can send a similar request as below: However, this is problematic if the data is susceptible to change. In case of a deletion in betwee...

Integrating Cosmos DB with OData (Part 2)
Aug 4, 2019
Post comments count 6
Post likes count 0

Integrating Cosmos DB with OData (Part 2)

Hassan Habib
Hassan Habib

In the first article of this series, we talked about integrating Cosmos DB with ASP.NET Core application powered by OData using a pre-built solution that was using Cosmos Client to run full CRUD operations. But that's not the only way we can work with Cosmos DB from ASP.NET Core - there are two more approaches that we could follow to work with this great technology. In this article we are going to leverage the power of the Entity Framework to communicate with Cosmos DB then add OData on top of that to supercharge our API with even more functionality that makes querying, filtering and navigating the data in ...

Integrating Cosmos DB with OData (Part 1)
Jul 27, 2019
Post comments count 5
Post likes count 0

Integrating Cosmos DB with OData (Part 1)

Hassan Habib
Hassan Habib

We talked in previous articles about the pluggability of OData with any storage technology regardless of its schema, whether it’s a SQL-based storage, NoSQL, In-Memory or simply a file on a hard-drive. This power of OData enables developers to work with powerful, planet-scale storage technologies such as Cosmos DB. In this article we are going to deep dive into one of three ways you can integrate Cosmos DB with OData but before we start, let’s talk a little bit about Cosmos DB, it’s capabilities and why it’s important to be able to expose that storage powerful through an API with OData.   What is C...

Enabling Pagination in Blazor with OData
May 19, 2019
Post comments count 4
Post likes count 0

Enabling Pagination in Blazor with OData

Hassan Habib
Hassan Habib

Summary We talked in a previous article about enabling OData in your existing ASP.NET Core API using EDM. One of the biggest advantages of following that method is to be able to take advantage of functionality such as count to enable an on-demand function in almost every web application such as navigation. In this article, we are going to talk about navigation from an abstract perspective as a plain API call, then leverage that power in a Blazor application to enable data navigation or pagination.   API Navigation Clone and run the example project I built for OData with EDM and run the project th...

Simplifying EDM with OData
May 19, 2019
Post comments count 19
Post likes count 0

Simplifying EDM with OData

Hassan Habib
Hassan Habib

Summary In a previous article, I talked about how you can leverage the power of OData with your existing ASP.NET Core API to bring in more features to your API consumers. But there are different ways you could enable OData on your existing API that are just as simple but offers more powerful features than overriding your existing routes and enabling dependency injection. For instance, if you’ve tried to perform a count operation using our previous method you will notice it doesn’t really return or perform anything, the same thing goes with many other features that we will talk about extensively in future a...

Supercharging ASP.NET Core API with OData
Apr 27, 2019
Post comments count 48
Post likes count 0

Supercharging ASP.NET Core API with OData

Hassan Habib
Hassan Habib

Summary In this article, I’m going to show you how you can supercharge your existing ASP.NET Core APIs with OData to provide better experience for your API consumers with only 4 lines of code. For the purpose of this tutorial please clone our demo project WashingtonSchools so you can follow up and try the different features we are going to talk about in this article. You can clone the demo project from here: https://github.com/hassanhabib/ODataDemo   What is OData? Let’s talk about OData … OData is an open source, open protocol technology that provides the ability to API developers to devel...

ASP.NET Core OData now Available
Jul 3, 2018
Post comments count 6
Post likes count 0

ASP.NET Core OData now Available

Sam Xu
Sam Xu

Introduction The Microsoft OData Team is proud to announce general availability (GA) of OData (Open OData Protocol) on ASP.NET Core 2.0. It is now available through Nuget package at https://www.nuget.org/packages/Microsoft.AspNetCore.OData, current its version is 7.0.0. Along this release, it will allow customers to create OData v4.0 endpoints and leverage the OData query syntax easily on multiple platforms, not only on Windows. This blog is intended to give you a tutorial about how to build/consume OData service through ASP.NET Core OData package. Let’s getting started. ASP.NET Core Web Application For ...

[Announcement] RESTier v0.6.0 Release
Aug 9, 2016
Post comments count 0
Post likes count 0

[Announcement] RESTier v0.6.0 Release

Vincent He
Vincent He

We are happy to announce that the RESTier 0.6.0 is released and available on NuGet. 0.6.0 is a release add fix several issues and add several key features, it has minor public API change comparing with previous release. Detailed release notes for v0.6.0 can be found here. This is a quick preview of the items included in 0.6.0 release, New features since 0.5.0-beta Bug-fixes since 0.5.0-beta A sample service is also created with newest package used and includes kinds of new features, refer to Trippin Samples for source code. Anyone who uses previous version of R...

[Announcement] RESTier v0.5.0 Release
May 24, 2016
Post comments count 0
Post likes count 0

[Announcement] RESTier v0.5.0 Release

Vincent He
Vincent He

We are happy to announce that the RESTier 0.5.0-beta is released and available on NuGet. 0.5.0-beta is a big release, it adopts dependency injection to provide lots of flexibility to consumers, it also adds many new features, fixes kinds of issues. Detailed release notes for v0.5.0-beta can be found here. Note beta is used in version is caused by the dependency injection package is not GAed yet, official version number cannot be used. And there is no plan to release 0.5.0. A sample service is also created with newest package used and includes kinds of new features, refer to Trippin Samples for source code. An...

[Announcement] Web API OData v5.9 Release
May 13, 2016
Post comments count 0
Post likes count 0

[Announcement] Web API OData v5.9 Release

Sam Xu
Sam Xu

We are happy to announce that the Web API OData v5.9 is released and available on NuGet. Detailed release notes for v5.9 can be found here. Thanks your support. You and your team are highly welcomed to try out this new version if you are interested in the new features and issues fixed. For any feature request, issue or idea please feel free to reach out to us at [WebApi@Github].  

[Ecosystem] Microsoft Power Query for Excel Releases Support for OData V4
May 14, 2015
Post comments count 0
Post likes count 0

[Ecosystem] Microsoft Power Query for Excel Releases Support for OData V4

Yi Ding - MSFT
Yi Ding - MSFT

We are pleased to pass the announcement of the enhanced support for OData V4 in the latest release of Power Query for Excel. Microsoft Power Query for Excel is an Excel add-in that enhances the self-service Business Intelligence experience in Excel by simplifying data discovery, access and collaboration. Microsoft Power Query for Excel has supported OData since its first release. The long awaited support for the OASIS OData V4 Standard entered private preview earlier this year and was officially released last week. This release addresses customer demand to take advantage of the growing number ...

[Announcement] ODataLib 5.6.4 Release
Apr 1, 2015
Post comments count 0
Post likes count 0

[Announcement] ODataLib 5.6.4 Release

Yi Ding - MSFT
Yi Ding - MSFT

We are happy to announce that the ODataLib 5.6.4 is released and available on NuGet. Detailed release notes are listed below: New Features: [GitHub issue #144] ODataLib now suppresses the errors in reading open entity’s undeclared collection or complex property value Bug Fixes: [GitHub issue #60] Fix an issue that $select does not work with EntityFramework 5 Call to Action: You and your team are highly welcomed to try out this new version if you are interested in the new features and fixes above. For any feature request, issue or idea please feel free to reach out to us at odatafeedback@microsoft.com.

[Announcement] ODataLib 6.11.0 Release
Apr 1, 2015
Post comments count 0
Post likes count 0

[Announcement] ODataLib 6.11.0 Release

Yi Ding - MSFT
Yi Ding - MSFT

We are happy to announce that the ODataLib 6.11.0 is released and available on NuGet. Detailed release notes are listed below: New Features: [GitHub issue #23] ODataLib now supports parsing URI path template. [GitHub issue #71] EdmLib now supports adding vocabulary annotations to EdmEnumMember. [GitHub issue #80] OData client for .NET now supports abstract entity type without key. [GitHub issue #85] ODataLib now supports additional preference headers: odata.track-changes, odata.maxpagesize and odata.continue-on-error. [GitHub issue #87] ODataLib now supports setting filter query option in ExpandedNavigationSelect...

Early investigation into supporting the OData V4 libraries in ASP.NET 5/MVC 6
Mar 12, 2015
Post comments count 0
Post likes count 0

Early investigation into supporting the OData V4 libraries in ASP.NET 5/MVC 6

Yi Ding - MSFT
Yi Ding - MSFT

Dear OData lovers, The OData team has started the investigation into supporting the OData .NET V4 libraries in ASP.NET 5/MVC 6. The work is currently going well and tracked by the following two GitHub issues: https://github.com/OData/odata.net/issues/97 https://github.com/OData/WebApi/issues/229 (initiated by one of our enthusiastic users @PinpointTownes on GitHub) It's been an interesting journey as it's a lot of fun testing how our libraries works with the new framework, absorbing its new design philosophy, and venting about strange incompatibilities. If you're interested in joining, just ...

OData team embraces open source
Mar 5, 2015
Post comments count 0
Post likes count 0

OData team embraces open source

Yi Ding - MSFT
Yi Ding - MSFT

Dear OData lovers, As many of you may have already noticed, the OData team is embracing open source. What does this empower you to do? You now can: Great, but how? To empower you to do the things mentioned above, we now: How is this different from what we did before? It's different in many ways: Have we finished? No. We are still beginners in doing the real open source. We'd love to learn from your help to improve in any aspect. If you'd like to help, send any advice/suggestion to odatafeedback@microsoft.com or create a GitHub issue to us. Looking forward to see you...

[Announcement] OData Web API 5.4 Release
Feb 6, 2015
Post comments count 0
Post likes count 0

[Announcement] OData Web API 5.4 Release

Congyong
Congyong

The NuGet packages for OData Web API 5.4 are now available on the NuGet gallery. Download this release You can install or update the NuGet packages for OData Web API 5.4 using the Package Manager Console: What’s in this release? This release primarily includes new features for OData (v4 and v3) Web API as summarized below: V4 package has a dependency on ODataLib 6.9. Questions and feedback You can submit questions related to this release, any issues you encounter and feature suggestions for future releases on our GitHub site.

[Announcement] ODataLib 6.10.0 Release
Feb 6, 2015
Post comments count 0
Post likes count 0

[Announcement] ODataLib 6.10.0 Release

Layla Liu
Layla Liu

We are happy to announce that the ODataLib 6.10.0 is released and available on NuGet. Detailed release notes are listed below:  New Features: [GitHub issue #1] EdmLib now supports EdmError/EdmLocation containing file name. [GitHub issue #26] OData Client for .NET now supports getting instance annotations from payload or getting metadata annotations. [GitHub issue #41] OData Client for .NET now supports posting an action with entity valued parameters that only contain setted properties.    Bug Fixes: [GitHub issue #34] Fix a bug that OData Client for .NET did not follow the ABNF rule for OData-Versi...

[Announcement] OData Web API 5.4 RC
Jan 30, 2015
Post comments count 0
Post likes count 0

[Announcement] OData Web API 5.4 RC

Congyong
Congyong

The NuGet packages for OData Web API 5.4 RC are now available on the NuGet gallery. Download this release You can install or update the NuGet packages for OData Web API 5.4 RC using the Package Manager Console: What’s in this release? This release primarily includes new features for OData (v4 and v3) Web API as summarized below: V4 package has a dependency on ODataLib 6.9. Questions and feedback You can submit questions related to this release, any issues you encounter and feature suggestions for future releases on our GitHub site.

[Announcement] OData Web API 5.4 Beta
Jan 22, 2015
Post comments count 0
Post likes count 0

[Announcement] OData Web API 5.4 Beta

Congyong
Congyong

The NuGet packages for OData Web API 5.4 beta are now available on the NuGet gallery. Download this releaseYou can install or update the NuGet packages for OData Web API 5.4 beta using the Package Manager Console: What’s in this release?This release primarily includes new features for OData (v4 and v3) Web API as summarized below: V4 package has a dependency on ODataLib 6.9. Questions and feedbackYou can submit questions related to this release, any issues you encounter and feature suggestions for future releases on our GitHub site.

How to consume SQL Spatial Data with Web API V2.2 for OData V4
Jan 11, 2015
Post comments count 0
Post likes count 0

How to consume SQL Spatial Data with Web API V2.2 for OData V4

Sam Xu
Sam Xu

Introduction Today, along with the increasing demands of Location-Based Services (LBS), it becomes more and more important to provide functionalities on SQL Spatial Data through a unique, robust and scalable service based on a standard protocol. This post is intended to give a tutorial about how to consume the SQL Spatial Data through EF & Web API V2.2 for OData V4. The method in this blog is similar to the method in How to use SQL Spatial Data with WCF ODATA Spatial, but the latter is based on WCF Data service. However, for more information about how to create a simple OData V4 service based on Web API, ...

The commenting system is not working
Jan 8, 2015
Post comments count 0
Post likes count 0

The commenting system is not working

Yi Ding - MSFT
Yi Ding - MSFT

Dear OData blog readers, The commenting system is not working. The MSDN support team has been reached out to and the rough fix timeline is early Feb. During this time, any advice or suggestion please send mail to odatafeedback@microsoft.com or open GitHub issues at our project repositories on GitHub. Best regards, The OData team

[Announcement] RESTier – A turn-key solution to build OData services
Jan 8, 2015
Post comments count 0
Post likes count 0

[Announcement] RESTier – A turn-key solution to build OData services

Yi Ding - MSFT
Yi Ding - MSFT

What is RESTier RESTier is a RESTful API development framework for building standardized, OData V4 based REST services on .NET. It can be seen as a middle-ware on top of Web API OData.  RESTier is built with the inspiration of combining simplicity of WCF DS with the flexibility of Web API OData. The main exciting features of RESTier are: What about ASP.NET Web API OData? As mentioned in the first part, RESTier is based on Web API OData. Web API OData will continuously be improved and RESTier will benefit from the improvements. Getting started The main getting started tutorials below show you how to user ...

[Tutorial & Sample] ODataLib Custom Payload Format
Jan 5, 2015
Post comments count 0
Post likes count 0

[Tutorial & Sample] ODataLib Custom Payload Format

Karata Liu
Karata Liu

This post is to guide you through the custom payload format support in ODataLib, which was introduced in ODataLib 6.9.0 release. All the sample codes in this post have been put to ODataSamples project, you can check it out under ScenariosCustomFormat folder. Background The OData specification defined several payload formats for data exchange. ODataLib has got built-in support for the JSON format(see OData JSON Format spec). But there are cases when someone tries to build up a RESTful service following OData conventions, and also wants to use a custom payload format other than JSON. For example, assuming we h...

[Announcement] WCF Data Services 5.6.3 RTM Tools Installer Release
Dec 18, 2014
Post comments count 0
Post likes count 0

[Announcement] WCF Data Services 5.6.3 RTM Tools Installer Release

Liang Wang [MSFT]
Liang Wang [MSFT]

We are happy to announce the release of WCF Data Services tooling version 5.6.3. It enables “Add Service Reference” to work with .NET 4.5.2 for consuming OData V1-3 services.  Previously, when you try to “Add Service Reference” for OData V1-3 service, in VS2012 or VS2013 with .Net 4.5.2, you will get the following error window with the message: “The custom tool ‘DataServicesCoreClientGenerator’ failed. Data service client code-generation failed: The element ‘DataService’ has an attribute ‘DataServiceVersion’ with an unrecognized version &lsqu...

[Announcement] ODataLib 6.9.0 Release
Dec 14, 2014
Post comments count 0
Post likes count 0

[Announcement] ODataLib 6.9.0 Release

Layla Liu
Layla Liu

We are happy to announce that the ODataLib 6.9.0 is released. Detailed release notes are listed below. New Features: [GitHub issue #7, #24, #25] [GitHub issue #33] ODataLib now supports custom payload format, including: Improvements: [GitHub issue #12] OData Client for .NET supports using DELETE http method in DataServiceContext.Execute method. Bug Fixes: [GitHub issue #2] Fix a bug that model validation fails when complex type is marked as abstract in Edm model. [GitHub issue #15] Fix a bug that ODataQueryOptionParser doesn't work on case insensitive query option if OData Uri resolver enables cas...

[Tutorial & sample] Functions & Actions in Web API V2.2 for OData V4.0 – Type Scenario
Dec 8, 2014
Post comments count 0
Post likes count 0

[Tutorial & sample] Functions & Actions in Web API V2.2 for OData V4.0 – Type Scenario

Sam Xu
Sam Xu

Introduction Functions and actions are two of the most important parts in OData. They are always very useful to define special/customized server-side behaviors to process the data in OData services. From OData V4 spec, functions and actions both are operations and can be either bound to a type or unbound. However, there's a little bit difference between them: In Web API V2.2 for OData V4.0, functions and actions are supported, for both bound and unbound. This blog is intended to use detail examples to illustrate how to configure/route/invoke functions and actions, for both bound and un-bound, in ...

[Announcement] OData V4 Client Code Generator 2.1.0 Release
Nov 9, 2014
Post comments count 0
Post likes count 0

[Announcement] OData V4 Client Code Generator 2.1.0 Release

Layla Liu
Layla Liu

Features   Bug Fixes:

[Announcement] ODataLib 6.8.1 Release
Oct 20, 2014
Post comments count 0
Post likes count 0

[Announcement] ODataLib 6.8.1 Release

Layla Liu
Layla Liu

We are happy to announce that the ODataLib 6.8.1 is released. Detailed release notes are listed below. Bug Fix New Features   Call to Action You and your team are highly welcomed to try out this new version if you are interested in the new features and fixes above. For any feature request, issue or idea please feel free to reach out to us atodatafeedback@microsoft.com.  

[Announcement] ODataLib 6.8.0 Release
Sep 27, 2014
Post comments count 0
Post likes count 0

[Announcement] ODataLib 6.8.0 Release

Layla Liu
Layla Liu

We are happy to announce that the ODataLib 6.8.0 is released. Detailed release notes are listed below. Bug Fix New Features   Call to Action You and your team are highly welcomed to try out this new version if you are interested in the new features and fixes above. For any feature request, issue or idea please feel free to reach out to us at odatafeedback@microsoft.com.

[Tutorial & Sample] ODataUriParser Extension Support
Sep 12, 2014
Post comments count 0
Post likes count 0

[Tutorial & Sample] ODataUriParser Extension Support

Karata Liu
Karata Liu

This post is to guide you through the extension support of OData URI parser, which was added in ODataLib 6.7 release. You can refer to the following article for basic usage of OData URI parser: All the demo code in this post has been put into ODataSamples project, you can check it out under the Components/UriParser subfolder. Background The OData URI parser implements the logic for processing various URIs according to OData convention. As you may know, the Open Data Protocol (OData) V4 is described by a series of specification documents. Among them, the Uri parser is covered in Part1– Protocol, Part...

Announcing the Release of Web API OData 5.3
Sep 11, 2014
Post comments count 0
Post likes count 0

Announcing the Release of Web API OData 5.3

DB Blogs
DB Blogs

The NuGet packages for ASP.NET Web API OData 5.3 are now live on the NuGet gallery! Download this release You can install or update the NuGet packages for ASP.NET Web API OData 5.3 using the NuGet Package Manager Console, like this: What’s in this release? This release primarily includes great new features for Web API OData v4 as summarized below: ASP.NET Web API OData 5.3 Additional Documentation Tutorials and other information about Web API OData are available from the ASP.NET web site (https://www.asp.net/web-api/overview/odata-support-in-aspnet-web-api). Que...

[Announcement] ODataLib 6.7.0 Release
Sep 4, 2014
Post comments count 0
Post likes count 0

[Announcement] ODataLib 6.7.0 Release

Layla Liu
Layla Liu

We are happy to announce that the ODL 6.7.0 is released and available on NuGet. Detailed release notes are listed below: New Features   Bug fixes Call to Action You and your team are highly welcomed to try out this new version if you are interested in the new features and fixes above. For any feature request, issue or idea please feel free to reach out to us at odatafeedback@microsoft.com.

Announcing the Release Candidates for Web API OData 5.3
Aug 27, 2014
Post comments count 0
Post likes count 0

Announcing the Release Candidates for Web API OData 5.3

DB Blogs
DB Blogs

The release candidate NuGet packages for ASP.NET Web API OData 5.3 are now live on the NuGet gallery! Download this release You can install or update the release candidate NuGet packages for ASP.NET Web API OData 5.3 using the NuGet Package Manager Console, like this: What’s in this release? This release primarily includes great new features for Web API OData v4 as summarized below: ASP.NET Web API OData 5.3 Release Candidate Additional Documentation Tutorials and other information about Web API OData are available from the ASP.NET web site (https://www.asp.net/w...

[Tutorial & Sample] WCF Data Services Entity Framework Provider is updated with WCF Data Service 5.6.2
Aug 17, 2014
Post comments count 0
Post likes count 0

[Tutorial & Sample] WCF Data Services Entity Framework Provider is updated with WCF Data Service 5.6.2

Zoe Luo
Zoe Luo

After WCF Data Services Entity Framework Provider version 1.0.0-alpha2 was released, we got lots of valuable feedbacks from customers. Recently we summarized all the feedbacks and fixed the most critical bugs reported. Now we are happy to announce the release of WCF Data Services Entity Framework Provider 1.0.0-beta2 (Below using EF6 Provider beta2 for short). Adopting EF6 provider beta2 in new service 1. Create a new project, an ASP.NET Empty Web Application in Visual Studio 2012 for example. 2. Install the EF6 Provider beta2 NuGet package. WCF Data Service 5.6.2 and Entity framework 6.0.1 will be i...

[Announcement] ODataLib 6.6.0 Release
Aug 1, 2014
Post comments count 0
Post likes count 0

[Announcement] ODataLib 6.6.0 Release

LeoHu1
LeoHu1

We are happy to announce that the ODL 6.6.0 is released and available on nuget along with the source code oncodeplex (please read the git history for the v6.6.0 code info and all previous version). Detailed release notes are listed below. Bug Fix New Features   Call to Action You and your team are highly welcomed to try out this new version if you are interested in the new features and fixes above. For any feature request, issue or idea please feel free to reach out to us atodatafeedback@microsoft.com.

[Tutorial & Sample] Using Unsigned Integers in OData
Jul 23, 2014
Post comments count 0
Post likes count 0

[Tutorial & Sample] Using Unsigned Integers in OData

LewisCheng
LewisCheng

Unsigned integers can be useful in many ways, such as representing data sizes, resource handles and so on. Though OData V4 only supports signed integer natively, the protocol offers a flexible way called type definition to allow users to ‘define’ unsigned integer types themselves. As an example, we know that any UInt16 integer can be represented by the primitive type Edm.Int32. Thus by type definition, we can define a new type named MyNamespace.UInt16 whose underlying type is Edm.Int32. By doing so, we can store and serialize UInt16 integers as Edm.Int32 ones. There are three advantages of leveraging type defini...

[Tutorial & Sample] Open complex type step by step with Web API 2.2 for OData v4.0
Jul 20, 2014
Post comments count 0
Post likes count 0

[Tutorial & Sample] Open complex type step by step with Web API 2.2 for OData v4.0

Sam Xu
Sam Xu

Introduction Recently, Microsoft officially announced Web API 2.2 for OData v4 via the blog post Announcing the Release of ASP.NET MVC 5.2, Web API 2.2 and Web Pages 3.2. In this release, a new feature named open complex type is introduced. As the ODL v4 spec says: Open complex types are keyless named structured types consisting of a set of declared and dynamic (un-declared) properties. Open complex types allow customers to add undeclared properties in the payload. And in the future they can use these properties in queries. This blog is intended to provide a step by step guide for you to use the open co...

[Tutorial & Sample] Client Delayed Query
Jul 9, 2014
Post comments count 0
Post likes count 0

[Tutorial & Sample] Client Delayed Query

Junlin Zheng
Junlin Zheng

In OData Client 6.5.0, together with OData Client Code Generator 2.0.0, we have improved the user experience on the client side by introducing delayed query into it. This feature enables valid compositions as many as you want when building a query in client, getting all parts into one request URL and sending it out when you get it ready. Currently, we support the generation of all operation imports and operations bound on single entity or a collection of entities in OData Client Code Generator 2.0.0, so as to invoke them directly in C# or VB .NET when writing client code to build queries. Bound functions can b...

[Announcement] OData Client Code Generator 2.0.0 release
Jul 8, 2014
Post comments count 0
Post likes count 0

[Announcement] OData Client Code Generator 2.0.0 release

Yi Ding - MSFT
Yi Ding - MSFT

We are happy to announce that the OData Client Code Generator is released and available on Visual Studio Gallery. In this release, we focused on lighting up more OData features and the usability of the generated APIs while preserving the most consistency with the former version. Following is the release notes: Improvements of this OData Client Code Generator update Usability It increases the usability of the template in the following ways: It was formerly designed as a DataServiceQuery<T> class. Which has the limitation that Now it is ...

[Tutorial & Sample] Using ODataUriParser for OData V4
Jul 4, 2014
Post comments count 0
Post likes count 0

[Tutorial & Sample] Using ODataUriParser for OData V4

Karata Liu
Karata Liu

Background This post is intended to guide you through the UriParser for OData V4, which is released within ODataLib V6.0 and later. You may have already read the following posts about OData UriParser in ODataLib V5.x: Some parts of the articles still apply to V4 UriParser, such as introduction for ODataPath and QueryNode hierarchy. In this post, we will deal with API changes and features newly introduced. UriParser Overview The main reference document for UriParser is the URL Conventions specification. The ODataUriParser class is its main implementation in ODataLib. The ODataUriParser class ...

[Announcement] ODataLib 6.5.0 Release
Jul 3, 2014
Post comments count 0
Post likes count 0

[Announcement] ODataLib 6.5.0 Release

LeoHu1
LeoHu1

We are happy to announce that the ODL 6.5.0 is released and available on nuget along with the source code oncodeplex (please read the git history for the v6.5.0 code info and all previous version). Detailed release notes are listed below. Bug Fix New Features A type definition defines a specialization of one of the primitive types. for details please refer to here.  A shared model that contains type defs for unsigned integers is defined. we will have a blog post on this website soon about how to use it in your service.   $count is used to request only the ...

[Tutorial & Sample] Refering when Constructing EDM Model
Jun 30, 2014
Post comments count 0
Post likes count 0

[Tutorial & Sample] Refering when Constructing EDM Model

Liang Wang [MSFT]
Liang Wang [MSFT]

Introduction EDM model plays a very important role in OData. When you want to use OData, the first thing should be constructing an EDM model. Previously, you need to build a complete EDM model, which means all types, terms, operations used in an EDM model should be declared in itself. If there are some elements in an existing model (CSDL), which you want to use when constructing a new model. The only method is “re-declared” them in the new model before using. It is costly and unworthy. Now, ODL provides a feature called “Model Reference”. If the new model (referencing model) want to use some types in an existing...

[Announcement] ODataLib 6.4.0 Release
Jun 24, 2014
Post comments count 0
Post likes count 0

[Announcement] ODataLib 6.4.0 Release

LeoHu1
LeoHu1

We are happy to announce that the ODL 6.4.0 is released and available on nuget along with the source code oncodeplex (please read the git history for the v6.4.0 code info and all previous version). Detailed release notes are listed below. Bug Fix New Features   ODataLib now supports new aysnc API in .Net 4.0. For example you can now use code like:  var customers = await ctx.Customers.ExecuteAsync(); please refer to this blog post http://blogs.msdn.com/b/odatateam/archive/2014/03/18/use-enumeration-types-in-odata.aspx On client side you should be able to wri...

[Tutorial & Sample] How to enable authentication for metadata documents in the OData Client Code Generator
Jun 22, 2014
Post comments count 0
Post likes count 0

[Tutorial & Sample] How to enable authentication for metadata documents in the OData Client Code Generator

Layla Liu
Layla Liu

Currently, the OData Client Code Generator doesn’t support authentication for metadata documents. Although authenticating the access to OData metadata documents is not encouraged for service builders unless they has a good reason to do so, However, it might not be easy to exclude $metadata from the authentication required by the service. So in this tutorial, I will give a sample on how to update the OData Client Code Generator to customize the metadata documents authentication support. Update the Code Generator Files You can follow “How to use OData client code generator to generate client side proxy class”...

[Announcement] ODataLib 6.3.0 Release
Apr 30, 2014
Post comments count 0
Post likes count 0

[Announcement] ODataLib 6.3.0 Release

LeoHu1
LeoHu1

We are happy to announce that the ODL 6.3.0 is released and available on nuget along with the source code oncodeplex (please read the git history for the v6.3.0 code info and allprevious version). Detailed release notes are listed below. Bug Fix New Features   ODataLib now supports referencing external CSDL document by using the edmx:Reference element, or specifies the schemas and annotations to include from the target document using the edmx:Include and edmx:IncludeAnnotations element, The scope of a CSDL document is now the document itself and all schemas inclu...

[Tutorial & Sample] How to Use Open Type in OData
Apr 29, 2014
Post comments count 0
Post likes count 0

[Tutorial & Sample] How to Use Open Type in OData

Liang Wang [MSFT]
Liang Wang [MSFT]

OData protocol introduces conception of open type which allows clients to add properties dynamically to instances of the type by specifying uniquely named values in the payload used to insert or update an instance of the type. This makes definition of entity type or complex type more flexible. Developers do not have to define everything which is probably used in the edm model. Server Side 1. Model Definition It is quite easy to define an open entity type or open complex type in server side. If a server uses CSDL file to define the data model, only adding an attribute OpenType="true" to the node of the...

[Announcement] ODataLib 6.2.0 release
Apr 14, 2014
Post comments count 0
Post likes count 0

[Announcement] ODataLib 6.2.0 release

LeoHu1
LeoHu1

We are happy to announce that the ODL 6.2.0 is released and available on nuget along with the source code on codeplex (please read the git history for the v6.2.0 code info and allprevious version). Detailed release notes are listed below. Bug fixes Fixed a bug for parsing $it in UriParser. Improved the JSON serialization performance for unindented format. New Features Known Issues Call to Action You and your team are highly welcomed to try out this new version if you are interested in the new features and fixes above. For any feature request, issue or idea please feel free to reach out t...

[Tutorial & Sample] Client Property Tracking for PATCH
Apr 9, 2014
Post comments count 0
Post likes count 0

[Tutorial & Sample] Client Property Tracking for PATCH

Layla Liu
Layla Liu

  In OData Client for .NET 6.2.0, we enabled the top level property tracking on client side when sending a PATCH. This feature allows client to send only updated properties, instead of the entire object to server. The top level property tracking means the client will only track the highest level properties in the class hierarchy. In other words, if customer is updating a property under a complex type property, or an item in a collection property under an entity, the client will send the entire complex type property (including unchanged properties under the complex property) or the entire collection (in...

[Discussion] Future Direction of WCF Data Services
Mar 27, 2014
Post comments count 0
Post likes count 0

[Discussion] Future Direction of WCF Data Services

Mike Pizzo
Mike Pizzo

WCF Data Services Microsoft initially released WCF Data Services as an easy way to implement an OData service over queryable data sources. This made it very easy to expose a model backed by the Entity Framework as an OData Service, and included a data provider model for plugging in other types of queryable data sources. WCF Data Services abstracted away all of the details of HTTP, OData, and the various payload formats, and the data provider was responsible for executing the underlying queries and returning the raw results to be serialized in the appropriate format. This framework worked well for exposing a ...

[Announcement] ODataLib 6.1.0 release
Mar 21, 2014
Post comments count 0
Post likes count 0

[Announcement] ODataLib 6.1.0 release

Yi Ding - MSFT
Yi Ding - MSFT

Hi all, As our commitment in rolling out new functionality in the OData V4 protocol continuously, we are excited to announce that OData Core Libraries 6.1 has been released to NuGet.  This release contains four packages, Core, EDM, Spatial and the .Net client. Call to Action If your team has an existing OData service or is considering adding an OData service, now is an excellent time to engage with us. In addition to building OData stacks, part of our charter is to help Microsoft align behind the OData protocol. If you need input on whether OData can do what your service needs to do, or input on wh...

[Announcement] OData core libraries now support OData v4
Mar 21, 2014
Post comments count 0
Post likes count 0

[Announcement] OData core libraries now support OData v4

Yi Ding - MSFT
Yi Ding - MSFT

Hi all, We are tremendously excited to announce that we have released version 6.0.0 of the OData core libraries to NuGet on Jan 27th. This release is particularly noteworthy as it is the first production-ready releasewith support for OData v4, the newest version of the OData protocol. We had two primary goals for this release: We have achieved both of these goals and are now well positioned to continue adding support for v4 features.  Stack Prioritization & Strategy Adjustment As you are probably aware, our team aligns with many teams inside and outside of Microsoft who are building OData services. T...

[Announcement] The ASP.NET Web API 2.2 for OData release and the OData Client Code Generator release
Mar 20, 2014
Post comments count 0
Post likes count 0

[Announcement] The ASP.NET Web API 2.2 for OData release and the OData Client Code Generator release

Yi Ding - MSFT
Yi Ding - MSFT

We are very excited to announce the availability of nightly builds on MyGet for ASP.NET Web API 2.2 for OData v4.0 along with OData Client Code Generator for writing OData v4 clients. The Web API 2.2 release is particularly noteworthy as it is the first Web API release with support for OData v4 with selected highly demanded features. For a summary of what’s new in OData v4.0, please visit What’s New in OData v4. What’s New in ASP.NET Web API 2.2 for OData v4.0 New features Where to get it It is now available at ASP.NET Web API 2.2 for OData v4.0 on MyGet. We recommend ve...

[Tutorial & Sample] Use Enumeration types in OData
Mar 18, 2014
Post comments count 0
Post likes count 0

[Tutorial & Sample] Use Enumeration types in OData

Tian Ouyang
Tian Ouyang

Enumeration is a very common data type in various data models. Enumeration types are useful means to represent data that needs to support certain programmatic options (such as the ability to detect one or more options are selected). OData v4 now supports Enumeration types, along with Primitive types, Complex types, and Entity types. And we expect there will be heavy usage of them. Let’s look at an example. Suppose we have an entity type called Product, and we want to have a property member that stores the color of the product. We could use a string type property, but an enumeration type property would look bet...

[Tutorial & Sample] Using Parameter Alias to simplify the OData URL
Mar 12, 2014
Post comments count 0
Post likes count 0

[Tutorial & Sample] Using Parameter Alias to simplify the OData URL

tjf_azure
tjf_azure

Are you suffering from typing complex parameter values in URL? Or even make it worse you need to type it more than once? To solve this problem, now Microsoft.OData.Core.dll 6.0 supports parameter alias in request URL, such as: ~/People?$filter=LastName eq @name and contains(Description, @name)&@name=’Bob’ It is implemented by introducing a new class: ParameterAliasNode and its base class is SingleValueNode. The alias (@name) is parsed into a ParameterAliasNode. Note: This blog assumes that you have writing ODL server side code experience. But how to leverage this feature? Just 3 steps: 1. Creat...

[Tutorial & Sample] Containment is Coming with OData V4
Mar 12, 2014
Post comments count 0
Post likes count 0

[Tutorial & Sample] Containment is Coming with OData V4

Liang Wang [MSFT]
Liang Wang [MSFT]

Before OData V4, every entity set must be accessed from top-level even it is in a containment relationship with other set. For example, assume a schema where Order Lines (Type: “OrderLine”, EntitySet: “OrderLines”) live within Orders (Type: “Order”, EntitySet: “Orders”). Then, Orders have an “id” member that is the key, and that OrderLines has id and OrderId (container id) members that form a composite key. There are two issues in this kind of model. To solve the above problems, containment navigation property (“containment” in short) is introduced in OData V4 (containment spec). Using containment, y...

[Tutorial & Sample] How to use OData Client Code Generator to generate client-side proxy class
Mar 11, 2014
Post comments count 1
Post likes count 0

[Tutorial & Sample] How to use OData Client Code Generator to generate client-side proxy class

Layla Liu
Layla Liu

Edited on July 09, 2014 by updating “Add OData Client Proxy File” for V2.0.0 and adding "Appendix" part. Please refer to "OData Client Code Generator 2.0.0 release" for V2.0.0 release notes Edited on Apr 29, 2014 by adding "Upgrade the Project Dependencies to the Most Recent Version" part. In this tutorial, you will generate an OData client proxy class for an OData V4 service by “OData Client Code Generator”. Install OData Client Code Generator Start Visual Studio, from the TOOLS menu, select Extensions and Updates In the left panel, expand Online -> Visual Studio Gallery. Search “OData Client Code ...

[Tutorial & Sample] Use Singleton to define your special entity
Mar 5, 2014
Post comments count 0
Post likes count 1

[Tutorial & Sample] Use Singleton to define your special entity

Zoe Luo
Zoe Luo

Ever had a special entity where there can be only one of its kind, but bothered by having to define a one-element entity set for it? Ever wanted to request a special entity but bothered by needing to find out its key first? Use a singleton! Singleton is newly introduced in OData V4, to allow developers name such special entity, and it can be addressed directly by its name from the service root. Let's think about a universal scenario which can benefit from singleton: We want to have a model to present the staff information of a company. So first, we define an EntityType named EmployeeType to represent the...

New and improved EULA!
Nov 13, 2013
Post comments count 0
Post likes count 0

New and improved EULA!

DB Blogs
DB Blogs

TL;DR: You can now (legally) use our .NET OData client and ODataLib on Android and iOS. Backstory For a while now we have been working with our legal team to improve the terms you agree to when you use one of our libraries (WCF Data Services, our OData client, or ODataLib). A year and a half ago, we announced that our EULA would include a redistribution clause. With the release of WCF Data Services 5.6.0, we introduced portable libraries for two primary reasons: It took some work to get there, and we had to make some sacrifices along the way, but we are now focused exclusively on portable libraries for client...

New version of OData Validator
Oct 27, 2013
Post comments count 0
Post likes count 0

New version of OData Validator

DB Blogs
DB Blogs

The OData team has been working on updating the OData Validator tool to support the new JSON format validation. We are pleased to announce that the tool now supports validating your V3 service for all three formats – ATOM, old JSON format (aka JSON Verbose) and the new JSON format. We are also working on adding OData V4 service validation support. We will continue adding more validation rules over the next few months. Please check out the tool here : https://services.odata.org/validation/ and provide us feedback. About the tool OData Validator is an OData protocol validation tool. We have gone through the ODat...

Using WCF Data Services 5.6.0 with Entity Framework 6+
Oct 2, 2013
Post comments count 0
Post likes count 0

Using WCF Data Services 5.6.0 with Entity Framework 6+

DB Blogs
DB Blogs

And now for some exciting news: you can finally use WCF Data Services with Entity Framework 6+! Today we are uploading a new NuGet package called WCF Data Services Entity Framework Provider. This NuGet package bridges the gap between WCF Data Services 5.6.0 and Entity Framework 6+. We were able to build this provider as an out-of-band provider (that is, a provider that ships apart from the core WCF DS stack) because of the public provider work we did recently. Upgrading an existing OData service to EF 6 If you are upgrading an existing OData service to Entity Framework 6 or greater, you will need to do a couple...

WCF Data Services 5.6.0 Release
Aug 26, 2013
Post comments count 0
Post likes count 0

WCF Data Services 5.6.0 Release

DB Blogs
DB Blogs

Recently we released updated NuGet packages for WCF Data Services 5.6.0. You will need the updated tooling (released today) to use the portable libraries feature mentioned below with code gen. What is in the release: Visual Studio 2013 Support The WCF DS 5.6.0 tooling installer has support for Visual Studio 2013. If you are using Visual Studio 2013 and would like to consume OData services, you can use this tooling installer to get Add Service Reference support for OData. Should you need to use one of our prior runtimes, you can still do so using the normal NuGet package management commands (you will need to un...

Using the new client hooks in WCF Data Services Client
Jul 26, 2013
Post comments count 0
Post likes count 0

Using the new client hooks in WCF Data Services Client

DB Blogs
DB Blogs

What are the Request and Response Pipeline configurations in WCF Data Services Client? In WCF Data Services 5.4 we added a new pattern to allow developers to hook into the client request and response pipelines. In the server, we have long had the concept of a processing pipeline. Developers can use the processing pipeline event to tweak how the server processes requests and responses. This concept has now been added to the client (though not as an event). The feature is exposed through the property on the . On there are two properties, called and . The contains configuration callbacks that influence reading ...

WCF Data Services 5.6.0 Alpha
Jun 28, 2013
Post comments count 0
Post likes count 0

WCF Data Services 5.6.0 Alpha

DB Blogs
DB Blogs

Today we are releasing updated NuGet packages and tooling for WCF Data Services 5.6.0. This is an alpha release and as such we have both features to finish as well as quality to fine-tune before we release the final version. You will need the updated tooling to use the portable libraries feature mentioned below. The tooling installer is available from the download center. What is in the release: Visual Studio 2013 Support The WCF DS 5.6.0 tooling installer has support for Visual Studio 2013. If you are using the Visual Studio 2013 Preview and would like to consume OData services, you can use this tooling inst...

WCF Data Services 5.5.0 Release
May 30, 2013
Post comments count 0
Post likes count 0

WCF Data Services 5.5.0 Release

DB Blogs
DB Blogs

WCF Data Services 5.5.0 has officially been released! The 5.5.0 release will be another NuGet-only release as we did not make any updates to the Visual Studio tooling. The last tooling update was version 5.3.0. Services created using this version of tooling should update the runtime binaries to 5.5.0 with NuGet. What is in the release: This release has two primary features: 1) significant enhancements to the URI parser and 2) public data source providers. In addition to the primary features, there are two secondary enhancements and over 40 bug fixes included with this release. URI Parser In the 5.2.0 release...

WCF Data Services 5.5.0 Prerelease
May 15, 2013
Post comments count 0
Post likes count 0

WCF Data Services 5.5.0 Prerelease

DB Blogs
DB Blogs

It’s that time again: yesterday we uploaded an RC for the upcoming 5.5.0 release. The 5.5.0 release will be another NuGet-only release. What is in the release: This release has two primary features: 1) significant enhancements to the URI parser and 2) public data source providers. URI Parser In the 5.2.0 release ODataLib provided a way to parse $filter and $orderby expressions into a metadata-bound abstract syntax tree (AST). In the 5.5.0 release we have updated the URI parser with support for most OData URIs. The newly introduced support for parsing $select and $expand is particularly notable. With the 5.5.0...

WCF Data Services 5.4.0 Release
Apr 2, 2013
Post comments count 0
Post likes count 0

WCF Data Services 5.4.0 Release

DB Blogs
DB Blogs

Today we are releasing version 5.4.0 of WCF Data Services. As mentioned in the prerelease post, this release will be NuGet packages only. That means that we are not releasing an updated executable to the download center. If you create a new WCF Data Service or add a reference to an OData service, you should follow the standard procedure for making sure your NuGet packages are up-to-date. (Note that this is standard usage of NuGet, but it may be new to some WCF Data Services developers.) Samples If you haven’t noticed, we’ve been releasing a lot more frequently than we used to. As we adopted this rapid cadence, ...

WCF Data Services 5.4.0 Prerelease
Mar 26, 2013
Post comments count 0
Post likes count 0

WCF Data Services 5.4.0 Prerelease

DB Blogs
DB Blogs

Recently we uploaded an RC for our upcoming 5.4.0 release. This release will be NuGet packages only. What is in the release: Client deserialization/serialization hooks We have a number of investments planned in the “request pipeline” area. In 5.4.0 we have a very big set of hooks for reaching into and modifying data as it is being read from or written to the wire format. These hooks provide extensibility points that enable a number of different scenarios such as modifying wire types, property names, and more. Instance annotations on atom payloads As promised in the 5.3.0 release notes, we now support instanc...

WCF Data Services 5.3.0 RTW
Feb 18, 2013
Post comments count 0
Post likes count 0

WCF Data Services 5.3.0 RTW

DB Blogs
DB Blogs

Today we are releasing an updated version of the WCF Data Services NuGet packages and tools installer. As mentioned in the prerelease blog post, this version of WCF DS has three notable new features as well as over 20 bug fixes. What is in the release: Instance annotations on feeds and entries (JSON only) Instance annotations are an extensibility feature in OData feeds that allow OData requests and responses to be marked up with annotations that target feeds, single entities (entries), properties, etc. WCF Data Services 5.3.0 supports instance annotations in JSON payloads. Support for instance annotations in A...

WCF Data Services 5.3.0-rc1 Prerelease
Jan 31, 2013
Post comments count 0
Post likes count 0

WCF Data Services 5.3.0-rc1 Prerelease

DB Blogs
DB Blogs

Today we released an updated version of the WCF Data Services NuGet packages and tools installer. This version of WCF DS has some notable new features as well as several bug fixes. What is in the release: Instance annotations on feeds and entries (JSON only) Instance annotations are an extensibility feature in OData feeds that allow OData requests and responses to be marked up with annotations that target feeds, single entities (entries), properties, etc. WCF Data Services 5.3.0 supports instance annotations in JSON payloads. Support for instance annotations in Atom payloads is forthcoming. Action Binding Par...

WCF Data Services 5.2.0 Released
Dec 17, 2012
Post comments count 0
Post likes count 0

WCF Data Services 5.2.0 Released

DB Blogs
DB Blogs

We’re pleased to announce that today we are releasing NuGet packages and a tools installer for WCF Data Services 5.2.0. As mentioned in the prerelease blog post, this release brings in the UriParser from ODataLib Contrib and contains a few bug fixes. Bug Fixes This release contains the following noteworthy bug fixes: URI Parser In this release ODataLib now provides a way to parse $filter and $orderby expressions into a metadata-bound abstract syntax tree (AST). This functionality is typically intended to be consumed by higher level libraries such as WCF Data Services and Web API. For a deta...

WCF Data Services 5.2.0-rc1 Prerelease
Dec 7, 2012
Post comments count 0
Post likes count 0

WCF Data Services 5.2.0-rc1 Prerelease

DB Blogs
DB Blogs

A couple of days ago we posted a new set of NuGet packages and today we posted a new tools installer for WCF Data Services 5.2.0-rc1. This prerelease integrates the UriParser from ODataLib Contrib and fixes a few bugs. What is in the prerelease This prerelease contains the following noteworthy bug fixes: URI Parser In this release ODataLib now provides a way to parse filter and orderby expressions into a metadata-bound abstract syntax tree (AST). This functionality is typically intended to be consumed by higher level libraries such as WCF Data Services and Web API. To parse a filter express...

Using Add Service Reference with OData services after installing Windows Phone SDK 8.0
Oct 31, 2012
Post comments count 0
Post likes count 0

Using Add Service Reference with OData services after installing Windows Phone SDK 8.0

DB Blogs
DB Blogs

In this post, we will talk about how you can continue to consume OData v3 services after installing Windows Phone SDK 8.0. If you are a developer who is using WCF Data Services to produce OData v3 services in Visual Studio 2012 and also only installed the new Windows Phone SDK 8.0 but not the OData Client Tools for Windows Phone Apps then you may experience a known issue. After installing Windows Phone SDK 8.0 on your system which has Visual Studio 2012, you will be hitting a known issue if you: In this case, Add Service Reference will reference an older version of data services references in...

How to update existing Windows Phone 7 OData applications to work with the new client tools
Oct 31, 2012
Post comments count 0
Post likes count 0

How to update existing Windows Phone 7 OData applications to work with the new client tools

DB Blogs
DB Blogs

OData Client Tools for Windows Phone Apps is recently released to add support for consuming OData v3 services. You may  already have a Windows Phone 7.1 application that consumes OData  and want to update it to work with OData V3 services using the new Windows Phone SDK 8.0 and OData Client Tools for Windows Phone Apps. In this short post we will describe how to update your existing Windows Phone 7 OData applications to take advantage of the new OData v3 support in client tools. This post assumes you already installed Windows Phone SDK 8.0 and OData Client Tools for Windows Phone Apps. When an existi...

OData Client Tools for Windows Phone Apps Now Available
Oct 30, 2012
Post comments count 0
Post likes count 0

OData Client Tools for Windows Phone Apps Now Available

DB Blogs
DB Blogs

Windows Phone 8 and Windows Phone SDK 8.0 were just announced and we are pleased to announce that OData Client Tools for Windows Phone 8 is also now available from the download center. OData Client Tools for Windows Phone 8 brings OData V3 support to the Windows Phone platform. This release enables you to consume OData V3 services in your Windows Phone application. More specifically, this exciting release extends the Add Service Reference experience with client-side OData support for developing Windows Phone 7 and Windows Phone 8 applications using Windows Phone SDK 8.0. The tooling adds references that ar...

Important: Security Advisory 2749655 affects WCF DS
Oct 9, 2012
Post comments count 0
Post likes count 0

Important: Security Advisory 2749655 affects WCF DS

DB Blogs
DB Blogs

What is the advisory? Microsoft just released Security Advisory 2749655, which addresses “an issue involving specific digital certificates that were generated by Microsoft without the proper timestamp attributes.” If you are using WCF Data Services 5.0.1 or have previously installed the WCF Data Services MSI from the download center, you may run into this issue. Does this issue create a security vulnerability? The advisory notes that “this is not a security issue”, meaning that this issue is not creating a vulnerability. However, there could be a combination of factors which might cause a WCF Data Service to s...

WCF Data Service 5.1.0-rc2 Released
Sep 26, 2012
Post comments count 0
Post likes count 0

WCF Data Service 5.1.0-rc2 Released

DB Blogs
DB Blogs

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
Aug 29, 2012
Post comments count 0
Post likes count 0

WCF Data Service 5.0.2 Released

DB Blogs
DB Blogs

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
Aug 29, 2012
Post comments count 0
Post likes count 0

OData 101: Bin deploying WCF Data Services

DB Blogs
DB Blogs

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
Aug 29, 2012
Post comments count 0
Post likes count 0

OData 101: Using the [NotMapped] attribute to exclude Enum properties

DB Blogs
DB Blogs

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)
Aug 23, 2012
Post comments count 0
Post likes count 0

OData 101: Building our first OData-based Windows Store app (Part 2)

DB Blogs
DB Blogs

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)
Aug 23, 2012
Post comments count 0
Post likes count 0

OData 101: Building our first OData-based Windows Store app (Part 1)

DB Blogs
DB Blogs

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
Aug 15, 2012
Post comments count 0
Post likes count 0

WCF Data Services 5.0.2-rc Prerelease

DB Blogs
DB Blogs

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
Jul 2, 2012
Post comments count 0
Post likes count 0

Trying out the prerelease OData Client T4 template

DB Blogs
DB Blogs

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
May 18, 2012
Post comments count 0
Post likes count 0

WCF Data Services 5.0.1 Released

DB Blogs
DB Blogs

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...

WCF Data Services EULAs updated
May 17, 2012
Post comments count 0
Post likes count 0

WCF Data Services EULAs updated

DB Blogs
DB Blogs

Today we are releasing an updated EULA for WCF Data Services. Effective as of WCF Data Services 5.0.1, the DLLs that constitute the runtime components of WCF Data Services are now officially redistributable. Please see the attached EULAs for more details. Please leave your thoughts and comments below.

NuGet and Bin Deploy
May 17, 2012
Post comments count 0
Post likes count 0

NuGet and Bin Deploy

DB Blogs
DB Blogs

We recently posted about trying to release WCF Data Services more frequently, and some of the changes we’re making. In this post, we’ll take a slightly deeper look at NuGet,bin deploy, and where WCF Data Services is headed. Managing dependencies with NuGet If you’re already familiar with NuGet, you probably understand its value proposition and can skip ahead to bin deploying applications. If you haven’t used NuGet before, this section will provide you with a quick introduction. The NuGet site has a great documentation section that provides significantly more detail. What is NuGet? Languages such as Ruby and P...

WCF Data Services, now with more releases!
May 7, 2012
Post comments count 0
Post likes count 0

WCF Data Services, now with more releases!

DB Blogs
DB Blogs

Like other teams at Microsoft, WCF Data Services has been working toward a goal of more frequent releases. We released 5.0 on April 9 and we pre-released WCF Data Services 5.0.1-rc* on April 20 (we’ll release the final version of very soon). The rapid release was possible because of three changes we’re making. First up, we’re… Adopting semantic versioning Semantic versioning is a growing movement that proposes a solution to confusing version numbers. Let’s see how semantic versioning applies to the pre-release: . Since only contains bug fixes, we bumped only the third digit of the version n...

Metro OData prerelease bits and app
Apr 26, 2012
Post comments count 0
Post likes count 0

Metro OData prerelease bits and app

DB Blogs
DB Blogs

Phani just published a blog post with directions on how to build OData apps for Windows 8 Metro. The Metro bits are still very much in a prerelease form (e.g., you’ll have to invoke codegen with a command line tool) but it should enable developers to start trying out OData on Metro. For the blog post as well as sample bits and the sample app, check out Phani’s blog: http://blogs.msdn.com/b/phaniraj/archive/2012/04/26/developing-windows-8-metro-style-applications-that-consume-odata.aspx. Have fun, and please feel free to provide feedback below.

WCF Data Services 5.1.0-rc Prerelease
Apr 20, 2012
Post comments count 0
Post likes count 0

WCF Data Services 5.1.0-rc Prerelease

DB Blogs
DB Blogs

Less than two weeks ago, we released WCF Data Services 5.0.0. Today, we are releasing 5.1.0-rc as a NuGet prerelease. What is in the prerelease This prerelease contains several bug fixes: Getting the prerelease The prerelease is only available on NuGet and must be installed using the prerelease cmdlet. Prereleases are not displayed in the Manage NuGet Packages dialog. To install this prerelease NuGet package, you can use one of the following commands in the Package Manager Console: Our NuGet package ids are: Call to action If you have experienced one of the bug...

JSON Light Sample Payloads
Apr 17, 2012
Post comments count 0
Post likes count 0

JSON Light Sample Payloads

DB Blogs
DB Blogs

We recently put together a document that contains some of our thinking about JSON light as well as a whole slew of sample payloads. We would love to hear any feedback you have on the format; you can comment in the accompanying OneNote. We will be accepting public feedback on JSON light until May 4, 2012. We will also provide a preview release of the JSON light bits via NuGet for interested parties. JSON light at-a-glance: https://skydrive.live.com/redir.aspx?cid=0d23ed2816deea7b&resid=D23ED2816DEEA7B!966&parid=D23ED2816DEEA7B!106&authkey=!AAYCE2RUJccjhHk Discussion: https://skydrive.live.com/redi...

How to use WCF DS 5.0 in a Web Site project
Apr 17, 2012
Post comments count 0
Post likes count 0

How to use WCF DS 5.0 in a Web Site project

DB Blogs
DB Blogs

The WCF Data Services 5.0 RTM release includes an update to the Add Service Reference behavior in Visual Studio. For most project types that target .NET Framework 4.0, this means that when you add a new service reference, you will automatically get assembly references to the new client assemblies, and your client will be able to communicate with servers that support v3 of the OData protocol. This does not happen by default for Web Site Projects, but there are some manual steps you can take to update these projects to use the new functionality. This applies to Web Site Projects only, not Web Application Projects ...

Actions in WCF Data Services – Part 3: A sample provider for the Entity Framework
Apr 12, 2012
Post comments count 0
Post likes count 0

Actions in WCF Data Services – Part 3: A sample provider for the Entity Framework

DB Blogs
DB Blogs

This post is the last in a series on Actions in WCF Data Services. The series was started with an example experience for defining actions (Part 1) and how IDataServiceActionProvider works (Part 2). In this post we’ll go ahead and walk through a sample action provider implementation that delivers the experience outlined in part 1 for the Entity Framework. If you want to walk through the code while reading this you’ll find the code here: http://efactionprovider.codeplex.com. Implementation Strategy The center of the implementation is the EntityFrameworkActionProvider class that derives from ActionProvid...

What happened to application/json in WCF DS 5.0?
Apr 11, 2012
Post comments count 0
Post likes count 0

What happened to application/json in WCF DS 5.0?

DB Blogs
DB Blogs

The roadmap for serialization formats We have been talking for a while about a more efficient format for JSON serialization. The new serialization format will be part of the OData v3 protocol, and we believe that the much-improved JSON format should be the default response when requesting application/json. You may notice that when you upgrade to WCF DS 5.0, requesting the old JSON format is a bit different. To get the old JSON format, you must now explicitly request application/json;odata=verbose or set the MaxDataServiceVersion header to 2.0. When will I get a 415 response and what can I do about it? WCF Dat...

Actions in WCF Data Services – Part 2: How IDataServiceActionProvider works
Apr 11, 2012
Post comments count 0
Post likes count 0

Actions in WCF Data Services – Part 2: How IDataServiceActionProvider works

DB Blogs
DB Blogs

In this post we will explorer the IDataServiceActionProvider interface, which must be implemented to add Actions to a WCF Data Service. However if you are simply creating an OData Service and you can find an implementation of IDataServiceActionProvider that works for you (I’ll post sample code with Part 3) then you can probably skip this post. Now before we continue, to understand this post fully you’ll need to be familiar with Custom Data Service Providers and a good place to start is here. IDataServiceActionProvider Okay so lets take a look at the actions interface: public interface IDataServiceActi...

Actions in WCF Data Services – Part 1: Service Author Code
Apr 10, 2012
Post comments count 0
Post likes count 0

Actions in WCF Data Services – Part 1: Service Author Code

DB Blogs
DB Blogs

If you read our last post on Actions you’ll know that Actions are now in both OData and WCF Data Services and that they are cool: “Actions will provide a way to inject behaviors into an otherwise data-centric model without confusing the data aspects of the model, while still staying true to the resource oriented underpinnings of OData." Our key design goal for RTM was to allow you or third party vendors to create an Action Provider that adds Action support to an existing WCF Data Services Provider. Adding Actions support to the built-in Entity Framework Provider for example. This post is the first of ...

WCF Data Services 5.0 RTM Release
Apr 9, 2012
Post comments count 0
Post likes count 0

WCF Data Services 5.0 RTM Release

DB Blogs
DB Blogs

I’m very pleased to announce the WCF Data Services 5.0 RTM release. You can download WCF Data Services 5.0 from here. This release includes several client and server features and libraries for .NET 4 and Silverlight 4. Below is a brief breakdown of the features that are available in this release. Upcoming blog posts will dive into Vocabularies By providing the ability to annotate metadata and instance data, vocabularies define a powerful extensibility point for OData. They convey meaning and extra information to enable richer client experiences. Simple vocabulary terms can do things like indicate a property...

Announcing OData T4 for C#, Preview 1
Jan 19, 2012
Post comments count 0
Post likes count 0

Announcing OData T4 for C#, Preview 1

DB Blogs
DB Blogs

  I’m very excited to announce the release of OData T4 for C# Preview 1, for the October 2011 CTP of the next version of WCF Data Services libraries, with support for code generation of service operations. The goal of this T4 preview and subsequent ones will be to get community feedback on the templates before having “Add Service Reference” natively generate T4 templates out of the box in a future release. Note that support for service operations was added to the T4 because many customers already use it and it has been a regularly requested feature by the community. Having said that, some support for actio...

Using Geospatial Data
Oct 17, 2011
Post comments count 0
Post likes count 0

Using Geospatial Data

DB Blogs
DB Blogs

This CTP of WCF Data Services adds support for geospatial data. The release allows use of all of the OData geospatial data types and the geo.distance() canonical function. This enables two key scenarios: Before I illustrate use of these features, I'd like to mention some limitations of this CTP. First, (and most significantly) WCF Data Services providers only support geospatial data with custom or reflection providers. You can't use Entity Framework at this time. OData will support geospatial data over EF as soon as there is an EF release that supports geospatial data. Second, this CTP does not allow null values ...

Actions in WCF Data Services
Oct 17, 2011
Post comments count 0
Post likes count 0

Actions in WCF Data Services

DB Blogs
DB Blogs

“Actions will provide a way to inject behaviors into an otherwise data-centric model without confusing the data aspects of the model, while still staying true to the resource oriented underpinnings of OData." The October 2011 CTP of WCF Data Services adds powerful, but incomplete support for Actions. The motivation behind Actions stems from wanting to advertise in an OData entry an invocable ‘Action’ that has a side-effect on the OData service. This statement is broad, but deliberately so; Actions have a lot of power. Using WCF Data Services to Invoke an Action: This release’s WCF Data Services client...

Introducing the OData Library
Oct 14, 2011
Post comments count 0
Post likes count 0

Introducing the OData Library

DB Blogs
DB Blogs

  This blog talks about a new feature delivered in the WCF Data Services October CTP that can be downloaded here. WCF Data Services’ latest CTP includes a new stand-alone library for working directly with OData. The library makes public some underpinnings of WCF Data Services (the server and client library), and we made this library stand-alone to allow its use independent from WCF Data Services. The library provides a low-level implementation of some components needed to build an OData producer/consumer. Specifically, we focused on the core tasks of reading/writing OData from streams in the library&rs...

Vocabularies in WCF Data Services
Oct 13, 2011
Post comments count 0
Post likes count 0

Vocabularies in WCF Data Services

DB Blogs
DB Blogs

Update (6/4/2012): This post is updated to reflect the few changes that were made to the vocabularies in OData v3 and the vocabularies feature in WCF Data Services 5.0. Please download the WCF Data Services 5.0 from the download center to follow along the code samples below. One new feature in WCF Data Services  is Vocabularies. You can learn more about vocabularies and how they are supported in OData here. In a nutshell, a vocabulary is a namespace containing terms where each term is a named metadata extension for an OData service. In this post, I’ll explain how to use this feature to produce an OData se...

Announcing WCF Data Services Oct 2011 CTP for .NET 4 and Silverlight 4
Oct 13, 2011
Post comments count 0
Post likes count 0

Announcing WCF Data Services Oct 2011 CTP for .NET 4 and Silverlight 4

DB Blogs
DB Blogs

    I’m very excited to announce the release of the October 2011 CTP of the next version of WCF Data Services libraries. This release includes libraries for .NET 4 and Silverlight 4 with new client and server features in addition to those included in our last October 2010, March 2011 and June 2011 CTPs. Below is a brief summary of the features available in this CTP. Subsequent blog posts will discuss each feature in more detail and provide examples of how to use each. Actions: The inability to kick-off a (non-CRUD) related server process via an OData hypermedia action was an omission somewhat miti...

OData Compression in Windows Phone 7.5 (Mango)
Oct 4, 2011
Post comments count 0
Post likes count 0

OData Compression in Windows Phone 7.5 (Mango)

DB Blogs
DB Blogs

  One of the most frequently requested features for OData is payload compression. We have added two events to DataServiceContext in the OData phone client included in the Windows Phone SDK 7.1 that enables you to work with compressed payloads: Now, let’s take a look at these in action. Here is a method that adds support for gzip compression for OData feeds in a Windows Phone app: using SharpCompress.Compressor; using SharpCompress.Compressor.Deflate; private void EnableGZipResponses(DataServiceContext ctx) {      ctx.WritingRequest += new EventHandler<ReadingWri...

Updated Item Templates for Microsoft Visual Studio 11 Express for Windows Developer Preview
Sep 15, 2011
Post comments count 0
Post likes count 0

Updated Item Templates for Microsoft Visual Studio 11 Express for Windows Developer Preview

DB Blogs
DB Blogs

Microsoft recently released the developer preview of the next version Windows as well as a developer preview of Visual Studio 11 for building apps on the new version of Windows. Some of you may have noticed that the “New Item” template for creating a WCF Data Services isn't working correctly (this is pre-release “preview” software after all). We have created a fix for these templates that you can use to unblock creating a WCF Data Service. The details of apply the fix are below – keep in mind this version of Visual Studio is a preview release only and the fix should only be used...

Update to the OData Library Available on CodePlex and NuGet
Sep 2, 2011
Post comments count 0
Post likes count 0

Update to the OData Library Available on CodePlex and NuGet

DB Blogs
DB Blogs

We have just released a new drop of ODataLib and EdmLib on CodePlex as a shared source project. ODataLib is a library used for advanced OData serialization and deserialization scenarios, and EdmLib is a library used to manipulate entity data models. We invite you to download the code and test it out – this is very much an alpha release so any and all feedback is welcome. You can download the source for these libraries (and a number of others that we have published) at odata.codeplex.com. The libraries are also available as a NuGet package at http://nuget.org/List/Packages/ODataLibrary. Shayne Burgess Progra...

Announcing WCF Data Services June 2011 CTP for .NET4 & SL4
Jun 30, 2011
Post comments count 0
Post likes count 0

Announcing WCF Data Services June 2011 CTP for .NET4 & SL4

DB Blogs
DB Blogs

Today we are releasing June CTP of the next version of the WCF Data Services libraries targeting.NET 4 and Silverlight 4.  Based on broad community feedback, in addition to features shipped as part of Oct 2010 CTP1, I’m happy to announce that this release includes two of the top three requested features by WCF Data Services developers; support for properties on derived types & support for Any/All LINQ operators. Below is a brief summary of the features available in this CTP.  Subsequent blog posts will discuss each feature in more detail and provide examples of how to use each. Properties on deri...

datajs V1 Now Available
Jun 29, 2011
Post comments count 0
Post likes count 0

datajs V1 Now Available

DB Blogs
DB Blogs

Over the last few months, we have been hard at work on the datajs library, releasing four preview versions and working with web developers to fine-tune the library. Today, we’re proud to announce that the first version of datajs is now available for download. What does it do? datajs is a JavaScript library for web applications that supports the latest version of the OData protocol and HTML5 features such as local storage. It provides a simple, extensible API that can help you write better web applications, faster.  Our goal is to simplify working with data on the web, and to leverage improvements in m...

Announcing datajs version 0.0.4
Jun 20, 2011
Post comments count 0
Post likes count 0

Announcing datajs version 0.0.4

DB Blogs
DB Blogs

  We are excited to announce that datajs version 0.0.4 is now available at https://datajs.codeplex.com/. The latest release adds support for Reactive Extensions for Javascript (RxJs), forward and backwards cache filtering, extended metadata, simplified OData call configuration, and provides various performance and quality improvements. To get started, simply browse over to the Documentation page, where you will find download instructions, overview and detailed topics, and some samples to get started quickly. This is the last planned release before version 1.0.0. The features and APIs are not expected to ...

Any/All support in WCF Data Services
May 31, 2011
Post comments count 0
Post likes count 0

Any/All support in WCF Data Services

DB Blogs
DB Blogs

The latest CTP of WCF Data Services adds one of the most frequently requested features, namely support for Any/All queries. Prior to this CTP there was no way to filter results based on properties of a related collection (or a multi-value property). For example if you have this model: You couldn’t ask for all movies starring someone called ‘Zack’. The first thing we did was to add support for Any/All in the OData protocol. If you are interested you can see how the design of Any/All evolved on the OData.org blog via a series of posts first here, then here and finally here. The latest CTP of...

Accessing an OData Media Resource Stream from a Windows Phone 7 Application (Streaming Provider Series-Part 3)
May 17, 2011
Post comments count 0
Post likes count 0

Accessing an OData Media Resource Stream from a Windows Phone 7 Application (Streaming Provider Series-Part 3)

DB Blogs
DB Blogs

In this third post in the series on implementing a streaming data provider, we show how to use the OData client library for Windows Phone 7 to asynchronously access binary data exposed by an Open Data Protocol (OData) feed. We also show how to asynchronously upload binary data to the data service. This Windows Phone sample is the asynchronous equivalent to the previous post Data Services Streaming Provider Series-Part 2: Accessing a Media Resource Stream from the Client; both client samples access the streaming provider that we create in the first blog post in this series: Implementing a Streaming Provider. This ...

Using Microsoft WCF Data Services Reference Data Caching Extensions (CTP)
Apr 20, 2011
Post comments count 0
Post likes count 0

Using Microsoft WCF Data Services Reference Data Caching Extensions (CTP)

DB Blogs
DB Blogs

Introduction Last week at MIX we announced proposed extensions to the OData protocol for obtaining changes (deltas) to the results of an OData Request. The extensions provide a hypermedia-driven model for obtaining a "Delta Link" from a delta-enabled feed that can later be used to obtain changes from the original results. Along with the announcement, we released a new CTP of WCF Data Services named "Microsoft WCF Data Services For .NET March 2011 Community Technical Preview with Reference Data Caching Extensions". As the (incredibly long) name implies, this CTP builds on (and is fully side...

Reference Data Caching Walkthrough
Apr 13, 2011
Post comments count 0
Post likes count 0

Reference Data Caching Walkthrough

DB Blogs
DB Blogs

This walkthrough shows how a simple web application can be built using the reference data caching features in the “Microsoft WCF Data Services For .NET March 2011 Community Technical Preview with Reference Data Caching Extensions” aka “Reference Data Caching CTP”. The walkthrough isn’t intended for production use but should be of value in learning about the caching protocol additions to OData as well as to provide practical knowledge in how to build applications using the new protocol features. Walkthrough Sections The walkthrough contains five sections as follows: &...

Announcing datajs version 0.0.3
Apr 13, 2011
Post comments count 0
Post likes count 0

Announcing datajs version 0.0.3

DB Blogs
DB Blogs

Today we are very excited to announce a new release of datajs. The latest release of datajs makes use of HTML5 storage capabilities to provide a caching component that makes your web application more interactive by reducing the impact of network latency. The library also comes with a pre-fetcher component that sits on top of the cache. The pre-fetcher detects application needs and brings in the data ahead of time; as a result the application user never experiences network delays. The pre-fetcher and the cache are fully configurable. The application developer can also specify which browser storage to use for data ...

Announcing WCF Data Services March 2011 CTP2 for .NET4 & SL4
Mar 9, 2011
Post comments count 0
Post likes count 0

Announcing WCF Data Services March 2011 CTP2 for .NET4 & SL4

DB Blogs
DB Blogs

  Today we are releasing CTP2 of the next version of the WCF Data Services libraries.  This release targets .NET 4 and Silverlight 4 and includes new client and server features in addition to those that shipped as part Oct 2010 CTP1.   Below is a brief summary of the features available in this CTP.  Subsequent blog posts will discuss each feature in more detail and provide examples of how to use each. Properties on derived types:  The WCF Data Services framework is designed to make it possible to expose a model that has inheritance hierarchy for the entities in the model howeve...

Introduction to Derived Properties
Mar 9, 2011
Post comments count 0
Post likes count 0

Introduction to Derived Properties

DB Blogs
DB Blogs

What is a derived property? A derived property is a property that does not exist on the EntityType associated with the EntitySet; rather it exists on a type that derives from the base type of the entity set. This feature has been among our customers top asks since the lack of support makes exposing models with rich, well-defined inheritance hierarchies impossible to do. To enable such scenarios WCF Data Services now supports both exposing and consuming models which have properties (primitive, complex & navigation) defined on subtypes of the base type associated with the set How can I specify derived prope...

New JavaScript library for OData and beyond
Feb 8, 2011
Post comments count 0
Post likes count 0

New JavaScript library for OData and beyond

DB Blogs
DB Blogs

Today we are announcing a new project called ‘datajs’, a cross-browser JavaScript library that enables web applications to do more with data. datajs leverages modern protocols such as JSON and OData as well as HTML5-enabled browser features. ‘datajs’ is an open source project, released under MIT. In this initial release, the library offers basic functionality to communicate with OData services. The library supports receiving data and submitting changes, using both the JSON and ATOM-based formats. The API can be made aware of metadata in cases where it's required, and operations can be batc...

Connecting to an OAuth 2.0 protected OData Service
Jan 21, 2011
Post comments count 0
Post likes count 0

Connecting to an OAuth 2.0 protected OData Service

DB Blogs
DB Blogs

This post creates a Windows Phone 7 client application for the OAuth 2.0 protected OData service we created in the last post. Prerequisites: To run this code you will need: Our application: Our application is a very basic Windows Phone 7 (WP7) application that allows you to browse favorites and if logged in create new favorites and see your personal favorites too. The key to enabling all this is authenticating our application against our OAuth 2.0 protected OData service, which means somehow acquiring a signed Simple Web Token (SWT) with the current user’s emailaddress in it. Our ap...

OData and OAuth – protecting an OData Service using OAuth 2.0
Jan 20, 2011
Post comments count 0
Post likes count 0

OData and OAuth – protecting an OData Service using OAuth 2.0

DB Blogs
DB Blogs

In this post you will learn how to create an OData service that is protected using OAuth 2.0, which is the OData team’s official recommendation in these scenarios:  So if your scenarios is one of the above or some slight variation we recommend that you use OAuth 2.0 to protect your service, it provides the utmost flexibility and power. To explore this scenario we are going to walkthrough a real-world scenario, from end to end. The Scenario We’re going to create an OData service based on this Entity Framework model for managing a user’s Favorite Uris: As you can see this is...

Using ASP.NET output caching with Data Services
Dec 8, 2010
Post comments count 0
Post likes count 0

Using ASP.NET output caching with Data Services

DB Blogs
DB Blogs

A lot of our customers have asked us how to cache results from their Data Service. Which is why I want to point you to this excellent post by Peter Qian (a developer on the Data Services team) that shows you how to setup ASP.NET output caching. It lays out what is required very clearly. Check it out. Alex James Program Manager Microsoft

Entity Set Resolver
Nov 29, 2010
Post comments count 0
Post likes count 0

Entity Set Resolver

DB Blogs
DB Blogs

Problem Statement:   In previous versions, the WCF Data Services .NET and Silverlight client libraries always assumed that all collections (aka entity sets) had the same base URI. This assumption was in place because the library used the URI provided in the DataServiceContext constructor to generate collection URIs using the OData addressing conventions. For example:  Base URI: http://localhost:1309/NorthwindDataService.svc/  Sample collection: Customers  Collection URI by convention: http://localhost:1309/NorthwindDataService.svc/Customers This simple convention based approach works when...

Additional Feed Customization Support
Nov 15, 2010
Post comments count 0
Post likes count 0

Additional Feed Customization Support

DB Blogs
DB Blogs

1.     Problem: In the previous version, WCF Data Services introduced the feed customization feature. This feature enabled users to map properties to certain elements in the Atom document. As an example, users could map a name property to the Atom title element. This is especially useful for generic feed readers which may not know how to interpret the properties in the content element but understand other Atom elements.   The OData protocol, and therefore our implementation, did not allow users to map to the repeating Atom link and category elements. In addition, users...

Named Resource Streams
Nov 12, 2010
Post comments count 0
Post likes count 0

Named Resource Streams

DB Blogs
DB Blogs

One of the new WCF Data Services features in the October 2010 CTP is something called Named Resource Streams. Background Data Services already supports Media Link Entries which allows you to associate a single streamed blob with an entry.  For example, you could have a Photo entry that lists the metadata about the photo and links directly to the photo itself. But what happens though if you have multiple versions of the Photo? Today you could model this with multiple MLEs, but doing so requires you to have multiple copies of the metadata for each version of the stream.  Clearly...

Introduction to Multi-Valued Properties
Nov 11, 2010
Post comments count 0
Post likes count 0

Introduction to Multi-Valued Properties

DB Blogs
DB Blogs

Although you may see both the terms, “Bags” and “Multi-Valued Property”, they refer to the same thing. While this naming change was not included with the latest WCF Data Services 2010 October CTP release, based on community feedback, we’ve decided to use Multi-Valued Property for all future releases. What is a Bag Type? Today entities in WCF Data Services (Customer, Order, etc) may have properties whose value are primitive types, complex types or represent a reference to another entry or collection of entries. However there is no support for properties that *contain* a collection (or Bag) of va...

Data Services Client for Win Phone 7 Now Available!
Oct 28, 2010
Post comments count 0
Post likes count 0

Data Services Client for Win Phone 7 Now Available!

DB Blogs
DB Blogs

  Today, at the PDC, we announced that a production-ready version of the WCF Data Services client for Windows Phone 7 is available for download from http://odata.codeplex.com.  This means that it is now simple to create an app that connects your Windows Phone 7 to all the existing OData services as well as the new ones we’re announcing at this PDC. The release includes a version of System.Data.Services.Client.dll that is supported on the phone (both the assembly and the source code) and a code generator tool to generate phone-friendly client side proxies The library follows most of the same patterns...

Walkthrough: OData client for Windows Live Services
Oct 26, 2010
Post comments count 0
Post likes count 0

Walkthrough: OData client for Windows Live Services

DB Blogs
DB Blogs

Background As described recently on the Windows Live team blog, programming against your Windows Live artifacts (Calendar, Photos, etc) is now possible using OData. This blog post will walk through how to use our recently released WCF Data Services CTP to interact with the Windows Live OData endpoint. In general the Windows Live OData endpoint is just like any other OData endpoint so the good news is you already pretty much know how to use it J. This post will cover the basics of using some of the new features in our latest WCF Data Services CTP and some of the Windows Live specific aspects you need to know suc...

Announcing WCF Data Services Oct 2010 CTP1 for .NET4 & SL4
Oct 26, 2010
Post comments count 0
Post likes count 0

Announcing WCF Data Services Oct 2010 CTP1 for .NET4 & SL4

DB Blogs
DB Blogs

Today we are releasing CTP1 of the next version of the WCF Data Services libraries.  This release targets .NET 4 and Silverlight 4 and includes new client and server features in addition to those that shipped as part of .NET 4 & SL4.  With this CTP, you can now use the WCF Data Services client to talk to your Windows Live resources (Photos, Contacts, Status, etc) who REST endpoints are now OData endpoints – more on that in our next blog post. Below is a brief summary of the features available in this CTP.  Subsequent blog posts will discuss each feature in more detail and provide examples of h...

WCF Data Services Client Library and Windows Phone 7 – Next Steps
Sep 27, 2010
Post comments count 0
Post likes count 0

WCF Data Services Client Library and Windows Phone 7 – Next Steps

DB Blogs
DB Blogs

We’ve received a fair number of questions regarding our current CTP library for Windows Phone 7 and what our RTM plans are. The goal of this post is to address many of those questions by describing our plans for the coming months…. Background The CTP release of the data services client that is currently available for the phone was an early release by our team to enable apps to be built and to allow us to validate how much of the data services client experience that we have in SL4 desktop today we could enable on the phone platform. We've been very pleased by the number of people using the library! That said, t...

ASP.NET Security Vulnerability
Sep 20, 2010
Post comments count 0
Post likes count 0

ASP.NET Security Vulnerability

DB Blogs
DB Blogs

Over the weekend the ASP.NET team released a Microsoft Security Advisory about a security vulnerability found in ASP.NET: https://www.microsoft.com/technet/security/advisory/2416728.mspx The WCF Data Services team looked into the issue and don’t believe there is any additional exposure to the vulnerability beyond what is exposed by ASP.NET. However, if the WCF Data Service is hosted in ASP.NET, it is quite possible that the vulnerability is present. If any users use the ASP.Net encryption logic to hide sensitive information from the client and use that encrypted data to make decisions in the WCF Data Service, t...

What do you want to see added/changed in WCF Data Services?
Sep 10, 2010
Post comments count 0
Post likes count 0

What do you want to see added/changed in WCF Data Services?

DB Blogs
DB Blogs

As we’ve posted a few times before on this blog the data services team is beginning to explore improvements and new features for our next release.  As part of this process, it’s critical that we hear your feedback, as it helps us ensure that what we build actually meets your requirements in real-world scenarios.  Today we’re launching a new site that will allow you to interact more directly with the development team and provide input: https://dataservices.mswish.net . The site’s pretty simple and self-explanatory – you can add a new feature request or vote for feature requests that are already there. W...

Data Services Streaming Provider Series-Part 2: Accessing a Media Resource Stream from the Client
Sep 8, 2010
Post comments count 0
Post likes count 0

Data Services Streaming Provider Series-Part 2: Accessing a Media Resource Stream from the Client

DB Blogs
DB Blogs

In this second post in the series on implementing a streaming data provider, we show how to use the WCF Data Services client library to access binary data exposed by an Open Data Protocol (OData) feed, as well as has how to upload binary data to the data service. For more information on the streaming provider, see the first blog post in this series: Implementing a Streaming Provider. PhotoData Sample Client Application In the previous post, we showed how to implement IDataServiceStreamProvider to create a data service that uses OData to store and retrieve binary image files, the media resource (MR) in OData ter...

OData and Authentication – Part 8 – OAuth WRAP
Aug 19, 2010
Post comments count 1
Post likes count 0

OData and Authentication – Part 8 – OAuth WRAP

DB Blogs
DB Blogs

OAuth WRAP is a claims based authentication protocol supported by the AppFabric Access Control (ACS) which is part of Windows Azure. But most importantly it is REST (and thus OData) friendly too. The idea is that you authenticate against an ACS server and acquire a Simple Web Token or SWT – which contains signed claims about identity / roles / rights etc – and then embed the SWT in requests to a resource server that trusts the ACS server. The resource server then looks for and verifies the SWT by checking it is correctly signed, before allowing access based on the claims made in the SWT. If you want to learn ...

Data Services Streaming Provider Series: Implementing a Streaming Provider (Part 1)
Aug 4, 2010
Post comments count 0
Post likes count 0

Data Services Streaming Provider Series: Implementing a Streaming Provider (Part 1)

DB Blogs
DB Blogs

The Open Data Protocol (OData) enables you to define data feeds that also make binary large object (BLOB) data, such as photos, videos, and documents, available to client applications that consume OData feeds. These BLOBs are not returned within the feed itself (for obvious serialization, memory consumption and performance reasons). Instead, this binary data, called a media resource (MR), is requested from the data service separately from the entry in the feed to which it belongs, called a media link entry (MLE). An MR cannot exist without a related MLE, and each MLE has a reference to the related MR. (OData inhe...

OData and Authentication – Part 7 – Forms Authentication
Jul 21, 2010
Post comments count 0
Post likes count 0

OData and Authentication – Part 7 – Forms Authentication

DB Blogs
DB Blogs

Our goal in this post is to re-use the Forms Authentication already in a website to secure a new Data Service. To bootstrap this we need a website that uses Forms Auth. Turns out the MVC Music Store Sample is perfect for our purposes because: The rest of this post assumes you’ve downloaded and installed the MVC Music Store sample. Enabling Forms Authentication: The MVC Music Store sample already has Forms Authentication enabled in the web.config like this: <authentication mode="Forms">   <forms loginUrl="~/Account/LogOn" timeout="2880&q...

OData and Authentication – Part 6 – Custom Basic Authentication
Jul 21, 2010
Post comments count 0
Post likes count 0

OData and Authentication – Part 6 – Custom Basic Authentication

DB Blogs
DB Blogs

You might remember, from Part 5, that Basic Authentication is built-in to IIS. So why do we need ‘Custom’ Basic Authentication? Well if you are happy using windows users and passwords you don’t. That’s because the built-in Basic Authentication, uses the Basic Authentication protocol, to authenticate against the windows user database. If however you have a custom user/password database, perhaps it’s part of your application database, then you need ‘Custom’ Basic Authentication. How does basic auth work? Basic authentication is a very simple authentication scheme, that shou...

Deploying an OData Service in Windows Azure
Jul 20, 2010
Post comments count 0
Post likes count 0

Deploying an OData Service in Windows Azure

DB Blogs
DB Blogs

Windows Azure and SQL Azure are the new Cloud service products from Microsoft. In this blog post, I am going to show you how you can take a database that is hosted in SQL Azure and expose it as OData in a rich way using WCF Data Services and Windows Azure. This walk-through requires that you have Visual Studio 2010 and both a Windows Azure and SQL Azure account. Step 1: Configure the Database in SQL Azure SQL Azure provides a great way to host your database in the cloud. I won’t spend a lot of time explaining how to use SQL Azure as there are a number of other blogs that have covered this in great detail. I h...

OData and Authentication – Part 5 – Custom HttpModules
Jul 19, 2010
Post comments count 0
Post likes count 0

OData and Authentication – Part 5 – Custom HttpModules

DB Blogs
DB Blogs

In the last post we saw how to add custom authentication inside your Data Service using the ProcessingRequest event. Unfortunately that approach means authentication is not integrated or shared with the rest of your website. Which means for all but the simplest scenarios a better approach is needed: HttpModules. HttpModules can do all sort of things, including Authentication, and have the ability to intercept all requests to the website, essentially sitting under your Data Service. This means you can remove all authentication logic from your Data Service. And create a HttpModule to protect everything on your web...

OData and Authentication – Part 4 – Server Side Hooks
Jul 19, 2010
Post comments count 0
Post likes count 0

OData and Authentication – Part 4 – Server Side Hooks

DB Blogs
DB Blogs

If you secure an OData Service using Windows authentication – see Part 2 to learn how – everything works as expected out of the box. What however if you need a different authentication scheme? Well the answer as always depends upon your scenario. Broadly speaking what you need to do depends upon how your Data Service is hosted. You have three options: But by far the most common scenario is… Hosted by IIS This is what you get when you deploy your WebApplication project – containing a Data Service – to IIS. At this point you have two realistic options: Whic...

Join the OData Mailing List
Jun 28, 2010
Post comments count 0
Post likes count 0

Join the OData Mailing List

DB Blogs
DB Blogs

Today we released an OData Mailing List.  This is the list to use if you have OData questions, comments on OData or want to discuss how OData should evolve over time.  To sign up to the list go here and follow the instructions provided.  The list is fully open so anyone can subscribe and participate.  Be sure to read the terms of use on the signup page to understand how  your feedback on the mailing list may be used to enhance OData over time. You can see a read only archive of all the messages from the mailing list here: https://www.odata.org/mailing-list  We look forward to hea...

TechEd 2010 OData Service
Jun 6, 2010
Post comments count 0
Post likes count 0

TechEd 2010 OData Service

DB Blogs
DB Blogs

TechEd North America 2010 is fast approaching (it starts Monday). This year we have added an OData service to the TechEd site, just like we did for MIX10 earlier this year. The service exposes the sessions, speakers and other associated information for the conference and is a great way to learn OData. Check-out the API page on the TechEd site here for more information on the service. If you are attending TechEd make sure you stop by the DMG booth (in the DAT section) and show the folks from DMG your OData App. Head over to https://www.odata.org/consumers to see the list of applications and libraries that can con...

OData Workshops in Raleigh, Charlotte, Atlanta, Chicago and NYC
Jun 1, 2010
Post comments count 0
Post likes count 0

OData Workshops in Raleigh, Charlotte, Atlanta, Chicago and NYC

DB Blogs
DB Blogs

Chris (aka Woody) Woodruff has organized a series of OData workshops to compliment the official OData Roadshow. This is highly recommended. So if for whatever reason you can’t make it to one of the OData Roadshow events, or you just can’t get enough OData, see if you can get along to one of Chris’ workshops. The workshops start in Raleigh tomorrow and finish in NYC on June 28th. Learn more and register here.

Service Operations and the WCF Data Services Client
May 26, 2010
Post comments count 0
Post likes count 0

Service Operations and the WCF Data Services Client

DB Blogs
DB Blogs

Service Operations in WCF Data Services allow you to create WCF style methods on your service. In general it is good practice to do most of your CRUD operations directly on the entities exposed by your WCF Data Services model but every once in a while you may have a need to do some custom operation that isn’t covered by the model and this is where service operations come into the picture.  Below is a simple service operation called CustomersByCity the returns a set of customers whose city matches the one passed as a parameter to the method: [WebGet] public IQueryable<Customer> CustomersByCity(str...

OData and Authentication – Part 3 – ClientSide Hooks
May 24, 2010
Post comments count 0
Post likes count 0

OData and Authentication – Part 3 – ClientSide Hooks

DB Blogs
DB Blogs

So far in this series we’ve looked at Windows Authentication. For both Windows and Basic Authentication, Data Services does the authentication handshake and subsequent sending of authentication headers – all without you directly setting a http header. It can do this because there is a higher level abstraction – the Credentials property – that hides the implementation details from you. All this works great for Windows and Basic Authentication. However if you are using a different authentication scheme, for arguments sake OAuth WRAP, the Credentials property is of no use. You have to get b...

Using Restricted Characters in Data Service Keys
May 21, 2010
Post comments count 0
Post likes count 0

Using Restricted Characters in Data Service Keys

DB Blogs
DB Blogs

If your Data Service includes entities with a string key, you can run into problems if the keys themselves contain certain restricted characters. For example OData has this uri convention for identifying entities: ~/Feed('key') So if the 'key' contains certain characters it can confuse Uri parsing and processing. Thankfully though Peter Qian, a developer on the Data Services team, has put together a very nice post that covers a series of workarounds for the problems you might encounter. Enjoy. Alex James Program Manager Data Services Team

OData and Authentication – Part 2 – Windows Authentication
May 10, 2010
Post comments count 0
Post likes count 0

OData and Authentication – Part 2 – Windows Authentication

DB Blogs
DB Blogs

Imagine you have an OData Service installed on your domain somewhere, probably using the .NET Data Services producer libraries, and you want to authenticate clients against your corporate active directory. How do you do this? On the Serverside First on the IIS box hosting your Data Service you need to turn on integrated security, and you may want to turn off anonymous access too. Now all unauthenticated requests to the website hosting your data service will be issued a HTTP 401 Challenge. For Windows Authentication the 401 response will include these headers: WWW-Authenticate: NTLM WWW-Authentica...

OData and Authentication – Part 1
May 10, 2010
Post comments count 0
Post likes count 0

OData and Authentication – Part 1

DB Blogs
DB Blogs

Here on the Data Services team we hear many people ask about authentication. Questions like: The answer to these questions, depends a lot upon scenario, in fact each authentication scenario presents unique challenges: As you can see lots of questions. And there is a real risk that people will get their answer wrong. How we plan to help So over the next month or so we – the Data Services team - are going to write a series of blog posts detailing our findings as we investigate common OData Authentication scenarios. It’s hard to know exactly where this series will take us, because ...

ADO.NET Data Services Update for .NET Framework 3.5 SP1 – Refresh
May 8, 2010
Post comments count 0
Post likes count 0

ADO.NET Data Services Update for .NET Framework 3.5 SP1 – Refresh

DB Blogs
DB Blogs

The Data Services team has released a refresh of the ADO.NET Data Services Update for .NET Framework 3.5 SP1 today and provides fixes for issues reported to us in the update to .NET Framework 3.5 SP1. For Windows Vista, Windows XP, Windows Server 2003 and Windows Server 2008 the refresh can be downloaded here. For Windows 7 and Server 2008 R2 the refresh can be downloaded here. The installer for the refresh is cumulative with the original ADO.NET Data Services Update for .NET Framework 3.5 SP1 and can be installed both on systems with that update installed and on systems without the update installed. This update...

Windows Phone Developer Tools April 2010 Refresh and the OData Client
May 7, 2010
Post comments count 0
Post likes count 0

Windows Phone Developer Tools April 2010 Refresh and the OData Client

DB Blogs
DB Blogs

Two months ago we released an OData Library for the Windows Phone 7 – see the blog post here. If you have downloaded the recent April 2010 Refresh of the Windows Phone Developer Tools you will have found that there is an issue in the refresh of the tools with loading the OData library. If you reference the System.Data.Services.Client.dll assembly from the April 2010 Refresh of the tools and try to deploy your project you will see the following message (thanks to Tim Heuer for point this out): The specific text of the error message is “Could not load file or assembly ‘{File Path}System.Data.Services.Client.dll...

OData Roadshow
May 5, 2010
Post comments count 0
Post likes count 0

OData Roadshow

DB Blogs
DB Blogs

We are taking the MIX10 Services Powering Experiences content on the road. New York, NY – May 12, 2010 Chicago, IL – May 14, 2010 Mountain View, CA – May 18, 2010 Shanghai, China – June 1, 2010 Tokyo, Japan – June 3, 2010 Reading, United Kingdom – June 15, 2010 Paris, France – June 17, 2010 One full day of OData and Azure fun! More details at https://www.odata.org/roadshow   -Mike Flasko Data Services, Lead Program Manager

Deep Fried OData
Apr 28, 2010
Post comments count 0
Post likes count 0

Deep Fried OData

DB Blogs
DB Blogs

I had the pleasure of sitting down with Chris Woodruff, a host of the Deep Fried Bytes podcast, at MIX 2010 to talk about OData and some of the announcements around OData at the conference.  The podcast is available at: http://deepfriedbytes.com/podcast/episode-53-a-lap-around-odata-with-mike-flasko/   -Mike Flasko Lead Program Manager, Data Services

The Open Data Protocol .NET Framework Client Library – Source Code Available for Download
Apr 26, 2010
Post comments count 0
Post likes count 0

The Open Data Protocol .NET Framework Client Library – Source Code Available for Download

DB Blogs
DB Blogs

We are happy to announce that we have made the source code for the .NET Framework 3.5 SP1 and Silverlight 3.0 Open Data Protocol (OData) client libraries available for download on the Codeplex website. This release represents the OData team’s continued commitment to the OData protocol and the ecosystem that has been built around it. We have had requests for assistance in building new client libraries for the OData protocol and we are releasing the source for the .NET Framework and Silverlight client libraries to assist in that process. We encourage anyone who is interested in the OData ecosystem and building ODat...

WCF Data Services for Silverlight 4 now available for download
Apr 20, 2010
Post comments count 0
Post likes count 0

WCF Data Services for Silverlight 4 now available for download

DB Blogs
DB Blogs

A couple of months ago, we released an update to .NET 3.5 SP1 and its counterpart ADO.NET Data Services for Silverlight 3 Update CTP3. I am now pleased to announce that we have shipped an updated Data Services client library with Silverlight 4. This release includes all the features that we shipped in the SL3 CTP3 Data Service release as well as support for NTLM, Basic and Digest authentication. If you are using the SL3 CTP3 release, the client library in SL4 represents the production release of that feature set. For more information regarding previously released features, check out our blog post here. The enhanc...

Introduction to Databinding (Updated)
Apr 19, 2010
Post comments count 0
Post likes count 0

Introduction to Databinding (Updated)

DB Blogs
DB Blogs

This blog post is an update to an introduction to the data binding capabilities we first added in Data Services v1.5 CTP1. We have taken the feedback received throughout the CTPs and made updates to the final design. Below is an update to the original binding post for CTP1 updated based on that feedback. Introduction to Data Binding A new collection type, DataServiceCollection, has been added to the client library which extends ObservableCollection and supports two way binding for client code. It is now possible to auto generate client side types that implement the INotifyPropertyChanged and INotifyCollectionChan...

Relationship links
Apr 5, 2010
Post comments count 0
Post likes count 0

Relationship links

DB Blogs
DB Blogs

Problem Statement OData (the protocol used by WCF Data Services) enables you to address the relationships between Entries. This functionality is required to be able to create or change a relationship between two instances, such as an Order_Detail that is related to a given Order. Currently the OData protocol requires clients and servers to agree up front on how to address relationships. For example, most OData implementations today follow the optional URL conventions for addressing links stated in the main OData spec. This convention states that a “$links” URI path segment be used to distinguish the relationship ...

Developing an OData consumer for the Windows Phone 7
Mar 19, 2010
Post comments count 0
Post likes count 0

Developing an OData consumer for the Windows Phone 7

DB Blogs
DB Blogs

A couple of days back at Mix we announced the CTP release of the OData Client Library for Windows Phone 7 series.Cool stuff undoubtedly. But how do you use it?Well Phani, a Data Services team member, shows you how on his blog.

Got SQL Azure? Then you’ve got OData
Mar 18, 2010
Post comments count 0
Post likes count 0

Got SQL Azure? Then you’ve got OData

DB Blogs
DB Blogs

In his MIX Keynote this week, Douglas Purdy demonstrated a new OData Service for SQL Azure. We are pleased to announce that a preview of this exciting technology, providing the quickest no-code solution for bringing your SQL Azure data into the growing OData ecosystem, is available to all SQL Azure users today.You can learn more about this exciting new preview on the OData Blog... 

Announcing the OData SDK
Mar 16, 2010
Post comments count 0
Post likes count 0

Announcing the OData SDK

DB Blogs
DB Blogs

Last November at PDC 09 we announced the Open Data Protocol (OData), providing a way to unlock your data and free it from silos that exist in applications today. OData makes it easy for data to be shared in a manner that follows the philosophy of Open Data and enables the creation of REST-based data services. These services allow resources identified using Uniform Resource Identifiers (URIs) and defined in an abstract data model, to be published and edited by Web clients using simple HTTP messages. OData enables a new level of data integration across a broad range of clients, servers, services, and tools. This mo...