session.CreateCriteria(typeof(Customer))
.Add(Restrictions.Eq("Firstname", firstname))
.List<Customer>();
or
session.CreateCriteria(typeof(Customer))
.Add(Expression.Eq("Firstname", firstname))
.List<Customer>();
The name space was changed (take a look to releasenotes.txt)
2008/9/26 SurfRat <[EMAIL PROTECTED]>
>
> Hi,
>
> I am following the Summer of Nhibernate series which is based on
> Nhibernate 1.2. I am using v2.0 of Nhibernate with no problems so far
> except that I can't figure out the correct syntax for the 1.2 code
> statement below:
>
> return session.CreateCriteria(typeof(Customer))
> .Add(new
> NHibernate.Expression.EqExpression("Firstname", firstname))
> .List<Customer>();
>
> The problem is with EqExpression. Any ideas? I have searched
> extensively for an answer but with no luck so far.
>
> Thanks
>
> SurfRat
>
> >
>
--
Fabio Maulo
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---