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

Closed Issue: QueryableAttribute failed when working with UInt32 and UInt64 property [477]

$
0
0
Sending request: http://localhost/test?$filter=(indexof('stringLiternal',StringProperty) gt UInt32Property)
or http://localhost/test?$filter=(indexof('stringLiternal',StringProperty) gt UInt64Property)

Server model class is:
public class EntityTypeModel1
{
public int ID { get; set; }
public string StringProperty { get; set; }
public DateTime? DateTimeProperty { get; set; }
public Decimal? DecimalProperty { get; set; }
public long LongProperty { get; set; }
public bool BoolProperty { get; set; }
public byte[] ByteArrayProperty { get; set; }
public Guid GuidProperty { get; set; }
public int Int32Property { get; set; }
public UInt16 UInt16Property { get; set; }
public UInt32 UInt32Property { get; set; }
public UInt64 UInt64Property { get; set; }
public char CharProperty { get; set; }
public char[] CharArrayProperty { get; set; }
}

Controller returns:
[Queryable]
public IEnumerable<EntityTypeModel1> Get()
{
return new EntityTypeModel1[] { new EntityTypeModel1() };
}

Server report exception:
System.InvalidOperationException occurred
HResult=-2146233079
Message=Nullable object must have a value.
Source=mscorlib
StackTrace:
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
InnerException:
> mscorlib.dll!System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource resource)
mscorlib.dll!System.Nullable<int>.Value.get()
[Lightweight Function]
System.Core.dll!System.Linq.Enumerable.WhereArrayIterator<MvcWebApi.ODataTests.QueryComposition.Fuzzing.EntityTypeModel1>.MoveNext()
System.Core.dll!System.Linq.Buffer<MvcWebApi.ODataTests.QueryComposition.Fuzzing.EntityTypeModel1>.Buffer(System.Collections.Generic.IEnumerable<MvcWebApi.ODataTests.QueryComposition.Fuzzing.EntityTypeModel1> source)
System.Core.dll!System.Linq.OrderedEnumerable<MvcWebApi.ODataTests.QueryComposition.Fuzzing.EntityTypeModel1>.GetEnumerator.MoveNext()
System.Core.dll!System.Linq.Enumerable.TakeIterator<MvcWebApi.ODataTests.QueryComposition.Fuzzing.EntityTypeModel1>.MoveNext()
mscorlib.dll!System.Collections.Generic.List<object>.List(System.Collections.Generic.IEnumerable<object> collection)
System.Core.dll!System.Linq.Enumerable.ToList<object>(System.Collections.Generic.IEnumerable<object> source)
Newtonsoft.Json.dll!Newtonsoft.Json.Serialization.JsonArrayContract.CreateWrapper(object list)
Newtonsoft.Json.dll!Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.Serialization.JsonContract valueContract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty)
Newtonsoft.Json.dll!Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(Newtonsoft.Json.JsonWriter jsonWriter, object value)
Newtonsoft.Json.dll!Newtonsoft.Json.JsonSerializer.SerializeInternal(Newtonsoft.Json.JsonWriter jsonWriter, object value)
Newtonsoft.Json.dll!Newtonsoft.Json.JsonSerializer.Serialize(Newtonsoft.Json.JsonWriter jsonWriter, object value)
System.Net.Http.Formatting.dll!System.Net.Http.Formatting.JsonMediaTypeFormatter.WriteToStreamAsync.AnonymousMethod__c()
System.Net.Http.Formatting.dll!System.Threading.Tasks.TaskHelpers.RunSynchronously(System.Action action, System.Threading.CancellationToken token)
System.Net.Http.Formatting.dll!System.Net.Http.Formatting.JsonMediaTypeFormatter.WriteToStreamAsync(System.Type type, object value, System.IO.Stream writeStream, System.Net.Http.HttpContent content, System.Net.TransportContext transportContext)
System.Net.Http.Formatting.dll!System.Net.Http.ObjectContent.SerializeToStreamAsync(System.IO.Stream stream, System.Net.TransportContext context)
System.Net.Http.dll!System.Net.Http.HttpContent.CopyToAsync(System.IO.Stream stream, System.Net.TransportContext context)
System.Net.Http.dll!System.Net.Http.HttpContent.CopyToAsync(System.IO.Stream stream)

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>