At first, i try this Quickstart Tutorial and it didn't work. So i read a
lot in forum.
Actually i change in User.hbm.xml one attribute:
old: <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
to: <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
After i doing this i extends the table property in class tag:
old: table="users"
to: table="[NHibernate].[dbo].[users]"
because the code didn't found my table. Before i had created the
database and had executed the script from tutorial.
Then i add virtual properties to User class. Kind of this:
public virtual string EmailAddress
{
get { return emailAddress; }
set { emailAddress = value; }
}
To the end. It works :-) Hopefully it helps you. |