Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
<PackageVersion Include="FirebirdSql.Data.FirebirdClient" Version="10.3.4" />
<PackageVersion Include="GitHubActionsTestLogger" Version="2.4.1" />
<PackageVersion Include="Iesi.Collections" Version="4.1.1" />
<PackageVersion Include="linq2db.SqlServer" Version="5.4.1.9" />
<PackageVersion Include="linq2db" Version="6.2.1" />
<PackageVersion Include="linq2db.SqlServer" Version="6.2.1" />
<PackageVersion Include="Microsoft.Data.SqlClient" Version="6.1.4" />
<PackageVersion Include="Microsoft.Data.Sqlite" Version="10.0.2" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.2" />
Expand Down
8 changes: 6 additions & 2 deletions benchmarks/Dapper.Tests.Performance/Benchmarks.Linq2DB.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Linq;
using Dapper.Tests.Performance.Linq2Db;
using LinqToDB;
using LinqToDB.Configuration;
using LinqToDB.Data;
using System.ComponentModel;

Expand All @@ -13,15 +14,18 @@ namespace Dapper.Tests.Performance
public class LinqToDBBenchmarks : BenchmarkBase // note To not 2 because the "2" confuses BDN CLI
{
private Linq2DBContext _dbContext;
private DataOptions _options;

private static readonly Func<Linq2DBContext, int, Post> compiledQuery = CompiledQuery.Compile((Linq2DBContext db, int id) => db.Posts.First(c => c.Id == id));

[GlobalSetup]
public void Setup()
{
BaseSetup();
DataConnection.DefaultSettings = new Linq2DBSettings(_connection.ConnectionString);
_dbContext = new Linq2DBContext();
// Use DataOptions (linq2db v6+ recommended pattern) instead of DefaultSettings
_options = new DataOptions()
.UseSqlServer(_connection.ConnectionString);
_dbContext = new Linq2DBContext(_options);
}

[Benchmark(Description = "First")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<PackageReference Include="DevExpress.Xpo" />
<PackageReference Include="EntityFramework" VersionOverride="6.5.1" />
<PackageReference Include="FirebirdSql.Data.FirebirdClient" />
<PackageReference Include="linq2db" />
<PackageReference Include="linq2db.SqlServer" />
<PackageReference Include="MySqlConnector" />
<PackageReference Include="NHibernate" />
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
using LinqToDB;
using LinqToDB.Configuration;
using LinqToDB.Data;

namespace Dapper.Tests.Performance.Linq2Db
{
public class Linq2DBContext : LinqToDB.Data.DataConnection
public class Linq2DBContext : DataConnection
{
public Linq2DBContext(DataOptions options) : base(options)
{
}

public ITable<Post> Posts => this.GetTable<Post>();
}
}
34 changes: 0 additions & 34 deletions benchmarks/Dapper.Tests.Performance/Linq2DB/Linq2DbSettings.cs

This file was deleted.