from mind
.CreateCriteria(typeof(DetentionSession),"det")
.Add(Restrictions.Between("det.sessionDateTime",beginDate,endDate))
.CreateCriteria("det.proctor")
.Add(Restrictions.Eq("proc.Id",proctorId))Tuna Toksöz Eternal sunshine of the open source mind. http://devlicio.us/blogs/tuna_toksoz http://tunatoksoz.com http://twitter.com/tehlike On Fri, Oct 2, 2009 at 8:13 AM, Dennis <[email protected]> wrote: > > I am new to NHibernate. I have a HQL query that works as follows: > > Dim queryString As String = "select det from DetentionSession det join > det.proctor proc " & "where (det.sessionDateTime between '" & > beginDate & "' and '" & endDate & "') and " & "(proc.Id = " & > proctorID & ")" > > Dim result As IList = SessionFactory.GetCurrentSession.CreateQuery > (queryString).List > > How would I translate this into a CriteriaQuery. I am using version > 2.0.1.4000. I use VB.NET. DetentionSession is a class with a child > of Proctor. > > > > Thank you, > > Dennis > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
