Hi,
I had a doubt how to use QBE and Criteria. Suppose I have an object with a Date property. So I end having an object like this
Code:
public class Foo
{
//private methods and constructor omitted
public DateTime PointInTime
{
get {return mPointInTime;}
set {mPointInTime = value;}
}
}
To create a QBE later I do
Code:
Foo f = new Foo()
f.PointInTime = DateTime.Now
ISession session = NHContext.Current.NHibernateSession
Example expample = Example.Create(f).
session.CreateCriteria(f.GetType()).Add(example)
What I dont know is if it is possible to add to the QBE a criteria to be able to retrieve all Foo that have a PointInTime smaller than the one provided in the Foo example. Also, if it is even advisable to use this for a search dialog.
Thanks