I've got linq to nhibernate query:
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();
And it is compiling very well, but if I use it, the exception is thrown:
NotSupportedException int32 CompareTo(System.String, System.String)
How could I take using linq query string values between two values. Like in SQL: select * from table where id between a and b ?