Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Created Issue: Navigation properties incorrect deserialization of key when using string [706]

$
0
0
using latest nightly of System.Web.Http.OData. using ODataConventionModelBuilder() and EnableOData() with Entity Framework.

When using a string as the key, links are generated as follows:

~/Entities
~/Entities('key')

and that's fine. However, when you try and use a navigation property, the link is as follows:

~/Entities('key')/NavigationProperty

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.

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.

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>