Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>There is no magic.svc that gets generated. You have done the 3 steps required for building an OData service. Refer to this <a href="http://www.asp.net/web-api/overview/odata-support-in-aspnet-web-api" rel="nofollow noreferrer">tutorial</a> and this blog <a href="http://blogs.msdn.com/b/webdev/archive/2013/01/29/getting-started-with-asp-net-webapi-odata-in-3-simple-steps.aspx" rel="nofollow noreferrer">post</a> for details.</p> <p>When you did,</p> <pre><code>DataModelBuilder modelBuilder = new ODataConventionModelBuilder(); modelBuilder.EntitySet&lt;Job&gt;("Products"); Microsoft.Data.Edm.IEdmModel model = modelBuilder.GetEdmModel(); </code></pre> <p>you have built the <a href="http://www.odata.org/documentation/odata-v3-documentation/odata-core/#2_Data_Model" rel="nofollow noreferrer">EDM model</a> for your OData service.</p> <p>When you did,</p> <pre><code>config.Routes.MapODataRoute("ODataRoute", "odata", model); </code></pre> <p>you are telling web API to expose an OData service at ~/odata/ (second argument) using the service model that you have just built.</p> <p>And when you are trying to fetch the url ~/odata/Products, the OData route that you have added knows that you are trying to access the Products entity set and routes it to the ProductsController. I will try to do a blog post about the conventions that ODataConventionModelBuilder uses and the default OData routing conventions.</p> <p>And regarding the other two questions,</p> <p>1) There is no out-of-the-box support for providing atom metadata. But, you can override atom metadata by using the nightly drops that added extensiblity points to the OData formatter. Refer to this <a href="https://stackoverflow.com/questions/15132667/customizing-odata-output-from-asp-net-web-api/15400048#15400048">answer</a> for details.</p> <p>2) We don't support aliasing right now. So, no luck there. It is one of the top items in our future plans though.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload