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.
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.