can't be found in SessionFactories error in NHibernate
ASP.NET
1
Posts
1
Posters
0
Views
1
Watching
-
Hi, I am new to NHibernate and got issues when running the project. My project name is TestNHibernate, the namespace name is TestNHibernate and the assembly name is TestNHibernate as well. I have a class name Slide.cs as follows:
namespace TestNHibernate
{
public class Slide : IPersistentObject
{private Guid ID; private int QuestionID; private string Questions; public virtual int QuestionIDD { get { return QuestionID; } set { QuestionID = value; } } public virtual Guid GUID { get { return ID; } set { ID = value; } } public virtual string Questionss { get { return Questions; } set { Questions = value; } } } public class FacadeSlide : BaseFacade { public FacadeSlide() { } public IList getAll() { try { return GetQuery().OrderBy(s => s.QuestionIDD).ToList(); } catch(Exception ex) { string s; s = ex.ToString(); return null; } } }
}
and my Slide.hbm.xml file is as follows:
The hibernate.cfg.xml file is as shown below:
NHibernate.Connection.DriverConnectionProvider NHibernate.Driver.SqlClientDriver Data Source=myServer;Initial Catalog=Practise;User ID=sa;Password=sa NHibernate.Dialect.MsSql2005Dialect thread true