File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
benchmarks/Dapper.Tests.Performance Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ using BenchmarkDotNet . Attributes ;
2
+ using System . ComponentModel ;
3
+ using System . Linq ;
4
+ using RepoDb ;
5
+
6
+ namespace Dapper . Tests . Performance
7
+ {
8
+ [ Description ( "RepoDB" ) ]
9
+ public class RepoDbBenchmarks : BenchmarkBase
10
+ {
11
+ [ GlobalSetup ]
12
+ public void Setup ( )
13
+ {
14
+ BaseSetup ( ) ;
15
+ SqlServerBootstrap . Initialize ( ) ;
16
+ ClassMapper . Add < Post > ( "Posts" ) ;
17
+ }
18
+
19
+ [ Benchmark ( Description = "Query" ) ]
20
+ public Post Query ( )
21
+ {
22
+ Step ( ) ;
23
+ return _connection . Query < Post > ( i ) . FirstOrDefault ( ) ;
24
+ }
25
+ }
26
+ }
Original file line number Diff line number Diff line change 22
22
<PackageReference Include =" Mighty" Version =" 3.1.3" />
23
23
<PackageReference Include =" Npgsql" Version =" 5.0.0" />
24
24
<PackageReference Include =" PetaPoco" Version =" 5.1.306" />
25
+ <PackageReference Include =" RepoDb.SqlServer" Version =" 1.1.3" />
25
26
<PackageReference Include =" ServiceStack.OrmLite.SqlServer" Version =" 5.10.2" />
26
27
<PackageReference Include =" SqlMarshal" Version =" 0.1.0" />
27
28
<PackageReference Include =" System.Data.SqlClient" Version =" 4.8.2" />
You can’t perform that action at this time.
0 commit comments