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

Closed Issue: ConventionModelBuilder should ignore indexer property [505]

$
0
0
It's meaningless to include indexer property to edm model. It will also cause error when user having overloaded indexer properties, like:

public class HttpHeaders
{
public string Item[string name] { get; set; }
public string Item[int index] { get; set; }
}

The exception is:
System.InvalidOperationException occurred
HResult=-2146233079
Message=Sequence contains more than one element
Source=System.Core
StackTrace:
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)
InnerException:
> System.Web.Http.OData.dll!System.Web.Http.OData.Builder.ODataConventionModelBuilder.RemoveBaseTypeProperties(System.Web.Http.OData.Builder.IEntityTypeConfiguration derivedEntity, System.Web.Http.OData.Builder.IEntityTypeConfiguration baseEntity) Line 255 + 0x85 bytes C#
System.Web.Http.OData.dll!System.Web.Http.OData.Builder.ODataConventionModelBuilder.DiscoverInheritanceRelationships() Line 208 + 0xe bytes C#
System.Web.Http.OData.dll!System.Web.Http.OData.Builder.ODataConventionModelBuilder.GetEdmModel() Line 166 + 0x8 bytes C#
System.Web.Http.OData.dll!System.Web.Http.HttpActionDescriptorExtensions.GetEdmModel.AnonymousMethod__0(object _) Line 32 + 0xb bytes C#
mscorlib.dll!System.Collections.Concurrent.ConcurrentDictionary<object,object>.GetOrAdd(object key, System.Func<object,object> valueFactory) + 0x49 bytes
System.Web.Http.OData.dll!System.Web.Http.HttpActionDescriptorExtensions.GetEdmModel(System.Web.Http.Controllers.HttpActionDescriptor actionDescriptor, System.Type entityClrType) Line 27 + 0x67 bytes C#
System.Web.Http.OData.dll!System.Web.Http.QueryableAttribute.CreateQueryContext(System.Type entityClrType, System.Web.Http.HttpConfiguration configuration, System.Web.Http.Controllers.HttpActionDescriptor actionDescriptor) Line 209 + 0xb bytes C#
System.Web.Http.OData.dll!System.Web.Http.QueryableAttribute.OnActionExecuted(System.Web.Http.Filters.HttpActionExecutedContext actionExecutedContext) Line 147 + 0xe bytes C#

Comments: Verified in latest 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>