public void TestGetSession() { ISession session = HibernateSessionFactory.GetSession(); HibernateSessionFactory.CloseSession(); Assert.IsNotNull(session); }
public static void Clean() { _session = HibernateSessionFactory.OpenSession(); _session.CreateSQLQuery("IF OBJECT_ID('dbo.Testtable') IS NOT NULL DROP TABLE Testtable").ExecuteUpdate(); }
public static void Init(TestContext context) { _session = HibernateSessionFactory.OpenSession(); _session.CreateSQLQuery("IF OBJECT_ID('dbo.Testtable') IS NOT NULL DROP TABLE Testtable").ExecuteUpdate(); _session.CreateSQLQuery("CREATE TABLE Testtable (ID int not null, Bla nvarchar(200))").ExecuteUpdate(); }
public static void MyClassInitialize(TestContext testContext) { _session = HibernateSessionFactory.OpenSession(); }
public static void Init(TestContext context) { _session = HibernateSessionFactory.OpenSession(); }
public ISession GetSession() { return(HibernateSessionFactory.GetSession()); }
static void Main(string[] args) { var session = HibernateSessionFactory.GetSession(); var albums = session.Load <Album>(121); }