Learn Dapper: https://www.learndapper.com/
Dapper Tutorial: https://dappertutorial.net/
Info
| Version: | 2.0.1-preview |
| Author(s): | Denis Voituron |
| Last Update: | Sunday, February 4, 2024 |
| .NET Fiddle: | Create the first Fiddle |
| Project Url: | https://github.com/Apps72/DbMocker |
| NuGet Url: | https://www.nuget.org/packages/DbMocker |
Install
Install-Package DbMocker
dotnet add package DbMocker
paket add DbMocker
DbMocker Download (Unzip the "nupkg" after downloading)
Dependencies
- Microsoft.SqlServer.Management.SqlParser(>= 160.20216.14)
Tags
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).
```csharp
var conn = new MockDbConnection();
conn.Mocks
.When(cmd => cmd.CommandText.Contains("SELECT COUNT(*) FROM EMP"))
.ReturnsScalar(14);
```.