Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
Dapper
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
Dapper
Commits
cb2ebea0
Commit
cb2ebea0
authored
Jun 22, 2011
by
Dmitry Naumov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added NHibernate test. NHibernate now uses stateless session.
parent
effaff00
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
NHibernateHelper.cs
Tests/NHibernate/NHibernateHelper.cs
+2
-2
PerformanceTests.cs
Tests/PerformanceTests.cs
+3
-0
No files found.
Tests/NHibernate/NHibernateHelper.cs
View file @
cb2ebea0
...
@@ -25,9 +25,9 @@ private static ISessionFactory SessionFactory
...
@@ -25,9 +25,9 @@ private static ISessionFactory SessionFactory
}
}
}
}
public
static
ISession
OpenSession
()
public
static
IS
tatelessS
ession
OpenSession
()
{
{
return
SessionFactory
.
OpenSession
();
return
SessionFactory
.
OpenS
tatelessS
ession
();
}
}
}
}
}
}
Tests/PerformanceTests.cs
View file @
cb2ebea0
...
@@ -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"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment