Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. can't be found in SessionFactories error in NHibernate

can't be found in SessionFactories error in NHibernate

Scheduled Pinned Locked Moved ASP.NET
javaxmlhelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dhyanga
    wrote on last edited by
    #1

    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
    
    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups