Commit cb2ebea0 authored by Dmitry Naumov's avatar Dmitry Naumov

Added NHibernate test. NHibernate now uses stateless session.

parent effaff00
...@@ -25,9 +25,9 @@ private static ISessionFactory SessionFactory ...@@ -25,9 +25,9 @@ private static ISessionFactory SessionFactory
} }
} }
public static ISession OpenSession() public static IStatelessSession OpenSession()
{ {
return SessionFactory.OpenSession(); return SessionFactory.OpenStatelessSession();
} }
} }
} }
...@@ -177,6 +177,9 @@ public void Run(int iterations) ...@@ -177,6 +177,9 @@ public void Run(int iterations)
.Query<Post>() .Query<Post>()
.Where(p => p.Id == id).First(), "NHibernate LINQ"); .Where(p => p.Id == id).First(), "NHibernate LINQ");
var nhSession5 = NHibernateHelper.OpenSession();
tests.Add(id => nhSession5.Get<Post>(id), "NHibernate Session.Get");
// bltoolkit // bltoolkit
var db1 = new DbManager(Program.GetOpenConnection()); var db1 = new DbManager(Program.GetOpenConnection());
tests.Add(id => db1.SetCommand("select * from Posts where Id = @id", db1.Parameter("id", id)).ExecuteList<Post>(), "BLToolkit"); tests.Add(id => db1.SetCommand("select * from Posts where Id = @id", db1.Parameter("id", id)).ExecuteList<Post>(), "BLToolkit");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment