Follow these steps to create a WebApi OData service for your Orchard Blogs
  • download the Orchard.OData module source code and add it under your modules folder.
  • create a new module ODataBlog and
    • add a reference to Orchard.OData module and to Orchard.Blogs.
    • add a reference to System.Net.Http, System.Net.Http.Formatting and System.Web.Http from the orchard/lib/aspnetwebapi folder of your latest orchard distribution
    • add a reference to System.Web.Http.OData from the Orchard.Odata/Libs folder
    • add a reference to System.Runtime.Serialization (4.0 .Net Framework)
  • create a Blog.cs model for your blogs that it is serializable ODataBlog Model
  • create the BlogController.cs that is going to serve the requests ODataBlog Controller
  • create a Routes.cs file and add your routes to handle OData requests ODataBlog Routes

working examples on azure cloud service$format=json$skip=5&$format=json$orderby=Title&$format=json$format=json$format=json

Last edited Aug 31, 2013 at 4:22 PM by fotisgpap, version 12


No comments yet.