Precept.Data
0.2.0
See the version list below for details.
dotnet add package Precept.Data --version 0.2.0
NuGet\Install-Package Precept.Data -Version 0.2.0
<PackageReference Include="Precept.Data" Version="0.2.0" />
<PackageVersion Include="Precept.Data" Version="0.2.0" />
<PackageReference Include="Precept.Data" />
paket add Precept.Data --version 0.2.0
#r "nuget: Precept.Data, 0.2.0"
#:package Precept.Data@0.2.0
#addin nuget:?package=Precept.Data&version=0.2.0
#tool nuget:?package=Precept.Data&version=0.2.0
Precept.Data
Database testing for Precept. Provider-agnostic: it works with any ADO.NET provider — SQL Server, PostgreSQL, MySQL, SQLite — supplied by the test project, so no driver is forced on you.
dotnet add package Precept.Data
services.AddPreceptData(cs => new NpgsqlConnection(cs));
await Db.ExecuteAsync(
"insert into clients (id, name) values (@id, @name)",
("id", id), ("name", "Acme"));
var outstanding = await Db.ScalarAsync<long>("select count(*) from outbox where sent = 0");
var rows = await Db.QueryAsync("select id, name from clients where active = 1");
Db.InRolledBackTransactionAsync runs work in a transaction that is always rolled back, for a check
that must leave nothing behind. Connection strings and additional databases are named — every method
takes a database argument defaulting to "Default".
Waiting for the database to catch up is the ordinary assertion sentence, not a sleep:
await Assert.Eventually(() => Db.ScalarAsync<long>("select count(*) from outbox where sent = 0"))
.ToBeEqualAsync(0L);
Part of Precept, a .NET 10 test automation framework. Full documentation: assertions · waiting · configuration
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.Configuration (>= 10.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.0)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 10.0.0)
- Microsoft.Extensions.Configuration.Json (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Precept.Core (>= 0.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.11.1 | 6 | 9/16/2026 |
| 0.11.0 | 39 | 9/15/2026 |
| 0.10.0 | 83 | 9/10/2026 |
| 0.8.0 | 80 | 9/10/2026 |
| 0.7.0 | 82 | 9/9/2026 |
| 0.6.0 | 89 | 9/2/2026 |
| 0.5.1 | 98 | 9/2/2026 |
| 0.5.0 | 88 | 9/1/2026 |
| 0.4.1 | 105 | 8/16/2026 |
| 0.4.0 | 114 | 8/16/2026 |
| 0.3.0 | 104 | 8/15/2026 |
| 0.2.0 | 97 | 8/15/2026 |
| 0.1.3 | 101 | 8/13/2026 |
| 0.1.2 | 101 | 8/13/2026 |
| 0.1.1 | 104 | 8/13/2026 |
| 0.1.0 | 99 | 8/12/2026 |