pengdows.crud
2.0.0
See the version list below for details.
dotnet add package pengdows.crud --version 2.0.0
NuGet\Install-Package pengdows.crud -Version 2.0.0
<PackageReference Include="pengdows.crud" Version="2.0.0" />
<PackageVersion Include="pengdows.crud" Version="2.0.0" />
<PackageReference Include="pengdows.crud" />
paket add pengdows.crud --version 2.0.0
#r "nuget: pengdows.crud, 2.0.0"
#:package pengdows.crud@2.0.0
#addin nuget:?package=pengdows.crud&version=2.0.0
#tool nuget:?package=pengdows.crud&version=2.0.0
pengdows.crud
pengdows.crud is a SQL-first, strongly-typed, testable data access layer for .NET. Itβs built for developers who want full control over SQL, predictable behavior across databases, and no ORM magic.
No LINQ. No tracking. No surprises.
π Why pengdows.crud?
- Built by a dev who actually writes SQL, understands ACID, and doesnβt want ORMs rewriting queries behind their back.
- Works across databases using consistent, standards-compliant behavior.
- Handles parameterization, enums, JSON, audit fields, and transactionsβout of the box.
- Offers full dependency injection, fine-grained connection control, and true multi-tenancy.
β Key Features
Starting with v2.0,
TableGateway<TEntity, TRowID>is the canonical CRUD gateway. The legacyEntityHelperalias has been removed.
TableGateway<TEntity, TRowID>: automatic CRUD with custom SQL injection points.- Full support for:
- Enums
- JSON
- GUIDs
- UTC timestamps
- Built-in audit tracking per entity and per field.
- Safe SQL generation with strict parameterization (
@,:, or?depending on provider). - Connection lifecycle modes:
New,Shared,KeepAlive. - Scoped transactions via
TransactionContext. - Works cleanly with DI and ADO.NETβno leaky abstractions.
π§© Supported Databases
Tested and tuned for:
- SQL Server / Express / LocalDB
- PostgreSQL / TimescaleDB
- Oracle
- MySQL / MariaDB
- SQLite
- Firebird
- CockroachDB
All tested against .NET 8 with native ADO.NET providers. Must support
DbProviderFactoryandGetSchema("DataSourceInformation").
β Not Supported
Due to missing or outdated .NET providers:
- TimesTen
- DB2
- Informix
- Sybase ASE
- SQL Anywhere
Note: DB2 and Sybase ASE are not planned and will not be implemented.
Want support? Ask the vendor to ship a real ADO.NET provider.
π« Not an ORM β On Purpose
pengdows.crud doesn't:
- Track entities
- Auto-generate complex queries
- Obfuscate SQL
Instead, it helps you write real SQL that's:
- Predictable
- Testable
- Secure
π§ Philosophy
- Primary keys β pseudokeys
- Open late, close early β manage connections responsibly
- Parameterize everything β always
- Audit everything β store in UTC
- Don't assume β use provider metadata (
DbProviderFactory,GetSchema) - Test in production-like environments β not theory
π¬ Tool Comparison
| Feature | pengdows.crud | Raw ADO.NET | Dapper | EF Core | NHibernate |
|---|---|---|---|---|---|
| Provider-Agnostic SQL | β | β οΈ Manual | β οΈ | β οΈ | β οΈ |
| Safe Parameterization | β | β Risky | β οΈ | β | β |
| Audit Field Support | β Built-in | β | β | β οΈ | β οΈ |
| Change Tracking | β Explicit | β | β | β | β |
| LINQ | β | β | β | β | β οΈ |
| Strong Typing | β | β οΈ Manual | β οΈ | β | β |
| Multi-tenancy | β Opt-in | β | β | β οΈ | β οΈ |
| Async/Await Support | β Fully | β οΈ Provider | β | β | β οΈ |
| Transaction Scoping | β Layered | β | β | β | β |
| Testability | β Interfaces | β | β οΈ | β οΈ | β οΈ |
| Migration Tooling | β By Design | β | β | β | β |
-## π Documentation
Topics include:
TableGateway<TEntity, TRowID>: CRUD entry point (EntityHelper alias removed in v2.0)SqlContainerDbModeand connection management- Audit and UTC logging
- Transaction scopes
- Type coercion and mapping
- Primary vs. pseudokeys
- Extending core helpers
π οΈ Getting Started
dotnet add package pengdows.crud
using System.Data.SqlClient;
using pengdows.crud;
var db = new DatabaseContext("your-connection-string", SqlClientFactory.Instance);
var helper = new TableGateway<MyEntity, long>(db);
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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.Binder (>= 9.0.6)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.6)
- pengdows.crud.abstractions (>= 2.0.0)
-
net8.0
- Microsoft.Extensions.Configuration.Binder (>= 9.0.6)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.6)
- pengdows.crud.abstractions (>= 2.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on pengdows.crud:
| Package | Downloads |
|---|---|
|
pengdows.hangfire
SQL-first Hangfire job storage built on pengdows.crud β a strongly-typed, cross-database data access layer for .NET. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.6-rc6 | 88 | 10/29/2026 |
| 2.0.6-rc4 | 95 | 10/28/2026 |
| 2.0.6-rc3 | 91 | 10/28/2026 |
| 2.0.6-rc2 | 96 | 10/28/2026 |
| 2.0.6-rc1 | 98 | 10/28/2026 |
| 2.0.5 | 417 | 4/17/2026 |
| 2.0.4 | 302 | 3/31/2026 |
| 2.0.3 | 234 | 3/27/2026 |
| 2.0.2 | 136 | 3/24/2026 |
| 2.0.1 | 153 | 3/22/2026 |
| 2.0.0 | 214 | 2/28/2026 |
| 1.0.1769867481 | 210 | 1/31/2026 |
| 1.0.1769543242 | 173 | 1/27/2026 |
| 1.0.1769395132 | 158 | 1/26/2026 |
| 1.0.1769360331 | 148 | 1/25/2026 |
| 1.0.1767194225 | 171 | 12/31/2025 |
| 1.0.1759683344 | 231 | 10/5/2025 |
| 1.0.1759623120 | 221 | 10/5/2025 |
| 1.0.1756777911 | 254 | 9/2/2025 |
| 1.0.1756431873 | 274 | 8/29/2025 |