Hi there,
I have an object called Product with a property called ReleaseDate. ReleaseDate is a nullable DateTime. I want to retrieve all the Product objects whose ReleaseDate occurs in the future (i.e., greater than DateTime.Now).
How to go about this? I'm assuming I need to use HQL for this but I'm not sure how to put together the right combination of criteria. Currently I'm doing this:
Code:
ICriteria cri = session.CreateCriteria(typeof(Product.Product));
cri.Add(NHibernate.Expression.Expression.IsNotNull("ReleaseDate"));
This works as expected (and returns those products whose ReleaseDate is not null); now how do I add a second criteria that says "give me only those Products whose ReleaseDate is greater than the current date?"
TIA,
Jeffrey