tags:

views:

41

answers:

2

This sounds like such a dumb question but I've spent too long looking for the 'Restrictions' object when attempting something like this...

Objects objs = NHibernateSession.CreateCriteria(typeof(Objects ))
                    .Add(Restrictions.Eq("ObjectName", objName))

I'm using nHibernate 2.2 I believe and have added references nHibernate, log4Net, lesi.Collections to my project and have searched through the object browser to find this elusive class. What am I missing?

A: 

The namespace is NHibernate.Criterion.

gcores
OK - kinda makes sense however, I'm missing that namespace. I have the nHibernate.dll referenced in my assembly and intellisense doesn't pick it up nor the object browser. I've justed checked my version of nHibernate which I can confirm is v2.1.2GA, the nHibernate.DLL has the runtime version of v2.0.50727 and the version of 1.2.0.3001. Any thoughts?
SeanCocteau
A: 

namespace - NHibernate.Criterion
class - NHibernate.Criterion.Restrictions
Assembly - NHibernate.dll

ilias
OK - kinda makes sense however, I'm missing that namespace. I have the nHibernate.dll referenced in my assembly and intellisense doesn't pick it up nor the object browser. I've justed checked my version of nHibernate which I can confirm is v2.1.2GA, the nHibernate.DLL has the runtime version of v2.0.50727 and the version of 1.2.0.3001. Any thoughts?
SeanCocteau