DbMocker 1.6.0

This .NET library simplifies data mocking for UnitTests, to avoid a connection to a relational database.
DbMocker use the standard Microsoft .NET DbConnection object. So, you can mock any toolkit,
including EntityFramework, Dapper or ADO.NET; And for all database servers (SQL Server, Oracle, SQLite).

var conn = new MockDbConnection();
   .When(cmd => cmd.CommandText.Contains("SELECT COUNT(*) FROM EMP"))

There is a newer prerelease version of this package available.
See the version list below for details.
Install-Package DbMocker -Version 1.6.0
dotnet add package DbMocker --version 1.6.0
<PackageReference Include="DbMocker" Version="1.6.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DbMocker --version 1.6.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes


  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.7.0-Preview2 103 5/20/2020
1.7.0-Preview1 95 5/20/2020
1.6.0 10,591 4/17/2019
1.5.0 769 9/2/2018
1.4.1-alpha 254 8/29/2018
1.4.0 326 8/5/2018
1.3.0 342 8/2/2018
1.2.0 325 7/31/2018
1.1.0 418 7/15/2018