Added NHibernate test. NHibernate now uses stateless session.

This commit is contained in:
Dmitry Naumov
2011-06-22 13:49:17 +04:00
parent effaff0040
commit cb2ebea032
2 changed files with 5 additions and 2 deletions
+2 -2
View File
@@ -25,9 +25,9 @@ namespace SqlMapper.NHibernate
}
}
public static ISession OpenSession()
public static IStatelessSession OpenSession()
{
return SessionFactory.OpenSession();
return SessionFactory.OpenStatelessSession();
}
}
}
+3
View File
@@ -177,6 +177,9 @@ namespace SqlMapper
.Query<Post>()
.Where(p => p.Id == id).First(), "NHibernate LINQ");
var nhSession5 = NHibernateHelper.OpenSession();
tests.Add(id => nhSession5.Get<Post>(id), "NHibernate Session.Get");
// bltoolkit
var db1 = new DbManager(Program.GetOpenConnection());
tests.Add(id => db1.SetCommand("select * from Posts where Id = @id", db1.Parameter("id", id)).ExecuteList<Post>(), "BLToolkit");