Edmx file has
<Property Name="SomePrimaryKeyID" Type="bigint" />
Corresponding object's property is
<Property Type="Int64" Name="SomePrimaryKeyID" Nullable="false" />
Query:
long[] ids = new long[]{1234567,1234568};
var results = context.SomeEntities.Where(x=> ids.Contains(x.SomePrimaryKeyID)).ToList();
When I use contains, EF generated query has explicit casting such as
... WHERE SomePrimaryKeyID IN (CAST (1234567 AS BIGINT),CAST (1234568 AS BIGINT))
Since long corresponds to bigint, I don't see a need for cast. Is there a way I can avoid this cast?