I am trying to filter only negative values using nhibernate projection queries. Below is my code for it
SearchTemplate RefundTemplate = new SearchTemplate();
RefundTemplate.Criteria = DetachedCriteria.For(typeof(AirBilling), "Ab");
RefundTemplate.Criteria.Add(NHibernate.Criterion.Expression.Eq("PaymentType", "CK"));
RefundTemplate.Criteria.Add(NHibernate.Criterion.Restrictions.Lt("Gross",0));
Basically I am tying to get all the records from the AirBilling table that have a PaymentType CK and Gross value is less that zero. But somehow the code doesnt work. It doesnt throw any errors, but it simply wont work.