sharp architecture mapping error
- by fez
this is the error when i load product entity
my code is
Configuration cfg = new NHibernate.Cfg.Configuration();
ISessionFactory sessions;
public MedicineController() //Construtor
{
cfg.Configure();
sessions = cfg.BuildSessionFactory();
}
using (var session = sessions.OpenSession())
{
var pGet = session.Get<Product>(0);
}
The Error is
Unable to locate persister for the entity named 'SharpArchitecture.Domain.Product'.
The persister define the persistence strategy for an entity.
Possible causes:
- The mapping for 'SharpArchitecture.Domain.Product' was not added to the NHibernate configuration.
Thanks in advance