sharp architecture mapping error
Posted
by
fez
on Stack Overflow
See other posts from Stack Overflow
or by fez
Published on 2012-04-11T13:14:11Z
Indexed on
2012/07/07
3:16 UTC
Read the original article
Hit count: 516
fluent-nhibernate
|sharp-architecture
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
© Stack Overflow or respective owner