tags:

views:

25

answers:

1

To use nhibernate attribute mapping, do you need a special dll?

I did:

using NHibernate.Mapping;

but for some reason when I did:

[NHibernate.Mapping.Attributes.Class(Lazy=true)]
public class MyClass
{

}

the word 'attributes' is in red i.e. vs.net didn't find the assembly reference?

+1  A: 

Yup. Get it at http://nhforge.org/media/p/8.aspx.

Michael Gattuso
do I need the validator also?
mrblah
Nhibernate validator is a separate standalone validation framework that can optionally hook into nhibernate. It is not required to use the mapping attributes. Nhibernate validation uses different attributes for the purposes of validation which shouldn't be confused with the mapping attributes.
Michael Gattuso