Hello,
To select a row from the database i'm using the following program :
Code:
using System;
using NHibernate;
using NHibernate.Cfg;
namespace NHibernateTest
{
public class Insertion
{
public static void Main(string[] args)
{
try
{
Configuration cfg = new Configuration();
//cfg.AddXmlFile("Equipement.hbm.xml");
cfg.AddAssembly("NHibernateTest");
ISessionFactory factory = cfg.BuildSessionFactory();
ISession session = factory.OpenSession();
Equipement equipement = (Equipement)session.Load(typeof(Equipement), "Internet-1");
session.Flush ();
System.Collections.IList EquipList = session.CreateCriteria(typeof(Equipement)).List();
foreach(Equipement equipement1 in EquipList)
{
System.Diagnostics.Debug.WriteLine(equipement1.Id + " name is " + equipement.Nom);
}
session.Close();
}
catch (System.Exception ex) { Console.WriteLine(ex.Message); }
}
}
}
And i get the following error
Code:
No persisters for: NHibernateTest.Equipement
Does any one see the problem ??
Thanks
Code:
Code: