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

Edited Issue: Multiple entity sets with same type is not supported for navigation property in derived type [553]

$
0
0
Repro code attached.
Send request: GET http://localhost:50232/vehicles to repro the issue.

The exception is:
System.NotSupportedException occurred
HResult=-2146233067
Message=Cannot autoCreate binding because there are two or more candidate EntitySets.
Source=System.Web.Http.OData
StackTrace:
at System.Web.Http.OData.Builder.EntitySetConfiguration.FindBinding(NavigationPropertyConfiguration navigationConfiguration, Boolean autoCreate) in d:\git\WebStackRuntime\src\System.Web.Http.OData\OData\Builder\EntitySetConfiguration.cs:line 207
InnerException:

If user explicitly sets binding to specified entity set, we shouldn't throw for multiple entity sets found. The problem is when adding navigation properties from derived types to base type, we use it's declared type to determine which entity set to bind, instead of the bindings user set in derived type.

Viewing all articles
Browse latest Browse all 7215

Trending Articles



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