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

Closed Issue: QueryableAttribute can't work with non-generic collection property [347]

$
0
0
Add non-generic collection property to model:
public class ModelClass
{
public CustomerCollection Customers { get; set; }
}
public class CustomerCollection : Collection<Customer>
{
}

ConventionModelBuilder reports following error:

System.ArgumentException occurred
Message=Many to Many navigationProperties must return either List<T> or Collection<T>.
Parameter name: property
Source=System.Web.Http.OData
ParamName=property
StackTrace:
at System.Web.Http.OData.Builder.NavigationPropertyConfiguration..ctor(PropertyInfo property, EdmMultiplicity multiplicity) in C:\dd\DevDiv\Offcycle\WPT\WebStackRuntime\runtime\src\System.Web.Http.OData\OData\Builder\NavigationPropertyConfiguration.cs:line 29
InnerException:

Comments: No longer repro in nightly build

Viewing all articles
Browse latest Browse all 7215

Trending Articles



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