Hi,
Is it possible to get the final generated query by NHibernate.ICriteria ?
Code:
NHibernate.ICriteria crit = session.CreateCriteria(typeof(PatientsEntity))
.Add(new GtExpression("Enabled", (System.Int16)0))
.Add(Expression.Disjunction()
.Add(new LikeExpression("Patient_id", id, MatchMode.Start))
.Add(new LikeExpression("Last_name", lastname, MatchMode.Start))
.Add(new LikeExpression("First_name", firstname, MatchMode.Start)));
MessageBox(crit.??????????????????);
... to get "SELECT patients.Id, patients. etc. " in a string ?
Thanks