I'm trying to build a criteria object using NHibernate that will compare date1 to date2 minus a value. In Sql Server I'd do this:
select * from table where date1 < DateAdd(Day, 2, date2)
Can anyone tell how I would do this in NHibernate?
Cheers
EDIT
I should have specified this earlier, I'd like to find out how do do this using the criteria API.
Also date1 and date2 are columns on the table, so I don't know their value before running the query