using latest nightly of System.Web.Http.OData. using ODataConventionModelBuilder() and EnableOData() with Entity Framework.<br /><br />When using a string as the key, links are generated as follows:<br /><br />~/Entities<br />~/Entities('key')<br /><br />and that's fine. However, when you try and use a navigation property, the link is as follows:<br /><br />~/Entities('key')/NavigationProperty<br /><br />and the string that is passed through to the controller action is "'key'" - it is wrapped in in the single quotes. this gets passed down to EF, (WHERE blah='''key''') and of course the query returns no results.<br /><br />The quotes are removed correctly when looking at an individual entity ~/Entities/('key') it seems, so there appears to be an oversight in the deserialization.
↧