I\'ve got linq to nhibernate query:
var listka =
from i in FakturyZakupu.Queryable
where String.Compare(i.REJESTRY.REJ_KOD,sbWartoscBetween1.ToStri
With queries like that, you can avoid the compare to by simply using the greater than (>) or less than (<) operators instead of String.Compare. For example:
var listka =
from i in FakturyZakupu.Queryable
where i.REJESTRY.REJ_KOD > sbWartoscBetween1.ToString() &&
i.REJESTRY.REJ_KOD < sbWartoscBetween2.ToString()
select i;
Your success with may depend upon your database's interpretation of string comparisons, but should generally work just fine.