Files
Nick Craver 78ed4b2077 Tests: move into folders
One of several moves to make this something we can dev on all platforms and build on Actions for v3 onwards.
2020-10-11 14:56:35 -04:00

29 lines
717 B
C#

using BenchmarkDotNet.Attributes;
using ServiceStack.OrmLite;
using System.ComponentModel;
using System.Data;
namespace Dapper.Tests.Performance
{
[Description("ServiceStack")]
public class ServiceStackBenchmarks : BenchmarkBase
{
private IDbConnection _db;
[GlobalSetup]
public void Setup()
{
BaseSetup();
var dbFactory = new OrmLiteConnectionFactory(ConnectionString, SqlServerDialect.Provider);
_db = dbFactory.Open();
}
[Benchmark(Description = "SingleById<T>")]
public Post Query()
{
Step();
return _db.SingleById<Post>(i);
}
}
}