I want to compare two values in Entity Framework. One of them is varchar in Database but the content is integer. I've tried some methods( as in Entity Framework/Linq EXpression converting from string to int Convert.ToInt32 not supported in EF6)
.Where(r => Convert.ToInt32(r.foo.xxx)>=yy)
.Where(r => int.Parse(r.foo.xxx)>=yy)
these parsing operations not supported in EF,
.Where(r => String.Compare(r.foo.xxx,yy)>=0
.Where(r => r.foo.xxx>= SqlFunctions.StringConvert(yy))
and these operation compare two string values(7 >= 58 in string comparison)
Is there anyway to compare these values in EF like Cast in MSSQL.
Thx.