Skip to content

Commit eb43a57

Browse files
authored
Merge pull request #1646 from kant2002/kant/sqlmarshal
[SqlMarshal](https://github.com/kant2002/sqlmarshal) is NativeAOT friendly mini-ORM which uses source code generators.
2 parents 3a09cb6 + bc334ca commit eb43a57

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
}

benchmarks/Dapper.Tests.Performance/Dapper.Tests.Performance.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<PackageReference Include="Npgsql" Version="5.0.0" />
2424
<PackageReference Include="PetaPoco" Version="5.1.306" />
2525
<PackageReference Include="ServiceStack.OrmLite.SqlServer" Version="5.10.2" />
26+
<PackageReference Include="SqlMarshal" Version="0.1.0" />
2627
<PackageReference Include="System.Data.SqlClient" Version="4.8.2" />
2728
<PackageReference Include="System.Data.SQLite" Version="1.0.113.6" />
2829
</ItemGroup>

0 commit comments

Comments
 (0)