I'm trying to test my code, I've (auto) generated all my classes an hbm files. So in form_load event I wrote this code:
Code:
private void Form1_Load(object sender, EventArgs e)
{
Configuration conf = new Configuration();
//conf.AddAssembly("ReglasPrestamos");
conf.AddAssembly(typeof(ReglasPrestamos.Aviso).Assembly);
ISessionFactory sessions = conf.BuildSessionFactory();
ISession session = sessions.OpenSession();
cboPais.DisplayMember = "Descripcion";
cboPais.ValueMember = "Id";
cboPais.DataSource = session.CreateCriteria(typeof(ReglasPrestamos.Provincia)).List();
session.Close();
}
but when I get to the line
conf.AddAssembly(typeof(ReglasPrestamos.Aviso).Assembly);
I get this exception:
"The 'default-lazy' attribute is not declared."
So, where should I declare that attribute?? I can't even find in source code where it's looked for...
help me... please...