File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
benchmarks/Dapper.Tests.Performance Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ using BenchmarkDotNet . Attributes ;
2
+ using System . ComponentModel ;
3
+
4
+ namespace Dapper . Tests . Performance
5
+ {
6
+ [ Description ( "SqlMarshal" ) ]
7
+ public partial class SqlMarshalBenchmarks : BenchmarkBase
8
+ {
9
+ [ GlobalSetup ]
10
+ public void Setup ( )
11
+ {
12
+ BaseSetup ( ) ;
13
+ }
14
+
15
+ [ Benchmark ( Description = "SqlCommand" ) ]
16
+ public Post SqlCommand ( )
17
+ {
18
+ Step ( ) ;
19
+ return ReadPost ( "select Top 1 * from Posts where Id = @id" , i ) ;
20
+ }
21
+
22
+ [ SqlMarshal ( "" ) ]
23
+ private partial Post ReadPost ( [ RawSql ] string sql , int id ) ;
24
+ }
25
+ }
Original file line number Diff line number Diff line change 23
23
<PackageReference Include =" Npgsql" Version =" 5.0.0" />
24
24
<PackageReference Include =" PetaPoco" Version =" 5.1.306" />
25
25
<PackageReference Include =" ServiceStack.OrmLite.SqlServer" Version =" 5.10.2" />
26
+ <PackageReference Include =" SqlMarshal" Version =" 0.1.0" />
26
27
<PackageReference Include =" System.Data.SqlClient" Version =" 4.8.2" />
27
28
<PackageReference Include =" System.Data.SQLite" Version =" 1.0.113.6" />
28
29
</ItemGroup >
You can’t perform that action at this time.
0 commit comments