I am getting the No persister for : <Entity> error. Following is the code I have.
My Mapping class seems to be Public. I do not see anything wrong. Any ideas? Entity: public class Product { public virtual int Id { get; set; } public virtual string Name { get; set; } public virtual int Price { get; set; } public Product() { } } Mapping Class: public class ProductMap : ClassMap<Product> { public ProductMap() { Table("Product"); Id(x => x.Id); Map(x => x.Name); Map(x => x.Price); } } private static ISessionFactory CreateSessionFactory() { log4net.Config.XmlConfigurator.Configure(); return Fluently.Configure() .Database(OracleClientConfiguration.Oracle10 .ConnectionString("Data Source=DEV;User Id=userid;Password=pwd;") .Driver<NHibernate.Driver.OracleClientDriver>().ShowSql()) .ExposeConfiguration( c => c.SetProperty("current_session_context_class", "web")) .Mappings(m => m.FluentMappings.AddFromAssembly(Assembly.GetExecutingAssembly()).ExportTo(@"C: \kk\")) .BuildSessionFactory(); } protected void Page_Load(object sender, EventArgs e) { var sessionFactory = CreateSessionFactory(); using (var session = sessionFactory.OpenSession()) { using (var transaction = session.BeginTransaction()) { Product p = new Product { Name = "Bargin Basin", Price = 10 }; session.Save(p); transaction.Commit(); } } } My DB table in ORACLE - Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit CREATE TABLE TEMPSESSION.Product ( Id INTEGER NOT NULL, Price INTEGER, Name VARCHAR2(50), PRIMARY KEY (Id) ) Thanks, Kalps -- You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to fluent-nhibernate@googlegroups.com. To unsubscribe from this group, send email to fluent-nhibernate+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en.