Quantcast
Channel: ASP.NET MVC / Web API / Web Pages
Viewing all articles
Browse latest Browse all 7925

Edited Issue: OData $filter returns incorrect results for byte arrays when using Linq2Objects [391]

$
0
0
$filter=BinaryProp eq binary'010203'
doesn't work even if BinaryProp is new byte[] { 1, 2, 3 }.

This is due to the fact that the expression that we generate does a reference equals i.e it looks like
$it.BinaryProp == new Byte[] { 1. 2. 3 }

The exact same filter works fine with Linq2SQL and EF as they translate the equals expression to the right SQL.


Viewing all articles
Browse latest Browse all 7925

Trending Articles



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