Hello People“s...
I development application in C# WinForms. I Have Hibarnta.cfg.xml and
files mapping .hbm.
But , Exception :
public static NHibernate.ISession getSession(object obj) {
NHibernate.Cfg.Configuration cfg = new NHibernate.Cfg.Configuration();
NHibernate.ISessionFactory factory = null;
NHibernate.ISession sessao = null;
Console.Write("GetType() " + obj.GetType());
cfg.AddClass(obj.GetType()); HERE
factory = cfg.BuildSessionFactory();
sessao = factory.OpenSession();
return sessao;
}
Ps.: All Files .hbm :
C:\Projeto
|_DAO
|_HBM
Hibernate.cfg
FrmApp.cs
Please, solution...
Thanks
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
Problems with Session and transaction handling?
Read this:
http://hibernate.org/42.html