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
e7ba3054
Commit
e7ba3054
authored
Jul 19, 2018
by
Jovan Popovic
Committed by
Marc Gravell
Jul 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Configured Belgrade Sql client to return data (#1066)
parent
cd751c21
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
Benchmarks.Belgrade.cs
Dapper.Tests.Performance/Benchmarks.Belgrade.cs
+6
-6
No files found.
Dapper.Tests.Performance/Benchmarks.Belgrade.cs
View file @
e7ba3054
using
BenchmarkDotNet.Attributes
;
using
BenchmarkDotNet.Attributes
;
using
Belgrade.SqlClient.SqlDb
;
using
System.Threading.Tasks
;
...
...
@@ -16,14 +16,13 @@ public void Setup()
}
[
Benchmark
(
Description
=
"ExecuteReader"
)]
public
async
Task
ExecuteReader
()
public
Post
ExecuteReader
()
{
Step
();
// TODO: How do you get a Post out of this thing?
await
_mapper
.
ExecuteReader
(
"SELECT TOP 1 * FROM Posts WHERE Id = "
+
i
,
var
post
=
new
Post
();
_mapper
.
ExecuteReader
(
"SELECT TOP 1 * FROM Posts WHERE Id = "
+
i
,
reader
=>
{
var
post
=
new
Post
();
post
.
Id
=
reader
.
GetInt32
(
0
);
post
.
Text
=
reader
.
GetString
(
1
);
post
.
CreationDate
=
reader
.
GetDateTime
(
2
);
...
...
@@ -39,6 +38,7 @@ public async Task ExecuteReader()
post
.
Counter8
=
reader
.
IsDBNull
(
11
)
?
null
:
(
int
?)
reader
.
GetInt32
(
11
);
post
.
Counter9
=
reader
.
IsDBNull
(
12
)
?
null
:
(
int
?)
reader
.
GetInt32
(
12
);
});
return
post
;
}
}
}
\ No newline at end of file
}
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