OData for Umbraco, is a OData provider built on WCF Data Services 4. It allows the content xml tree inside of Umbraco to be queried using LINQ. (Essentially it’s using LINQ to XML and LINQ to Objects)

Service metadata is created at runtime, so no code generation is required. By default it’s secured using Basic HTTP and only has SELECT support.

Whats Possible With OData and Umbraco

PowerPivot for Excel 2010 (for business analysis)
Import and visualize data inside of Excel, and combine with other data sources. http://powerpivot.com/

Service Contract Inside Of Visual Studio
Interact with data programmatically, using service references. This is commonly used when creating Silverlight/WPF applications.

JQuery
WCF Data Services supports JSON/JSONP, so you fetch data from the umbraco tree using JQuery. Stephen Walter has an excellent tutorial http://stephenwalther.com/blog/archive/2010/04/01/netflix-jquery-jsonp-and-odata.aspx
Due to the current preview the service only supports basic http authentication. (Looking for feedback how to implement this, either using .config files or compiled code)

Find out more at odata.org

Prerequisites

  • .NET 4.0
  • Umbraco 4.1 RC

Install

  • Download the latest package and import under Packages -> Install Local Package
  • Add XML under configuration inside of web.config
<system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
</system.serviceModel>

The Service Will Throw Exception If ASP.NET Compatibility Is Disabled - This is to allow access to umbraco XML cache
AspNetCompatibility Is Required, Set In Web.Config (configuration/system.serviceModel/serviceHostingEnvironment/@aspNetCompatibilityEnabled=true)
  • View Your Service OData Service At /umbraco/odata.svc/ (slash is important)
Login Using Your Umbraco Backend Credentials

Last edited Jun 18, 2010 at 12:22 AM by ElijahG, version 19