Hi,
I'm new to nHibernate, this is the first example I'm trying to do, but I can't make it work.
I made a simple aspx page with some fields (Name, Surname, Address), then a class representing that (Person).
I also made a mapping xml and put the nhibernate configuration in the Web.Config.
I load the page, but after I hit the button "Save", the following error appears:
"The located assembly's manifest definition with name 'NHibernate' does not match the assembly reference."
I don't know what's that.
I have organized the Solution in two proyects:
The Web Proyect, and one called Entities.
The entities proyect has the link to the nhbiernate.dll.
And only a file with the Person class.
The class has setters and getters.
And the following method:
<code>
public static void Guardar(Persona _persona)
{
// Configuracion de nHibernate
Configuration cfg = new Configuration();
// Creo una session con la transaccion para que usa nHibernate
ISessionFactory factory = cfg.BuildSessionFactory();
ISession session = factory.OpenSession();
ITransaction transaction = session.BeginTransaction();
session.Save(_persona);
transaction.Commit();
session.Close();
}
</code>
When that method is triggered, the error appears.
What should I do?
Thanks a lot !!!
|