我有 linq to nhibernate 查询:
var listka =
from i in FakturyZakupu.Queryable
where String.Compare(i.REJESTRY.REJ_KOD,sbWartoscBetween1.ToString()) >= 0
&& String.Compare(i.REJESTRY.REJ_KOD,sbWartoscBetween2.ToString()) <= 0
select i;
lista = listka.ToList();
而且它编译得很好,但是如果我使用它,就会抛出异常:
NotSupportedException int32 CompareTo(System.String, System.String)
我怎么能在两个值之间使用 linq 查询字符串值。就像在 SQL 中一样: select * from table where id between a and b ?