π Introducing Pengdows.CRUD β SQL-First, Developer-Focused, Cross-Database Simplicity for .NET
Pengdows.CRUD is now open source! This is not an ORM β on purpose. It’s a clean, high-performance, developer-centric data access library for .NET that gives you full control, strong typing, and total SQL transparency, without boilerplate or runtime magic.
π§© Why Another Data Layer?
Because developers deserve tools that:
- Donβt hide how SQL works.
- Respect your schema and naming.
- Eliminate cross-database quirks.
- Donβt slow you down with runtime reflection or fragile magic.
- Let you write code thatβs predictable, secure, and fast.
If youβve ever outgrown Entity Framework, struggled with Dapper verbosity, or been burned by tools that abstract too much β this is for you.
π₯ Key Features & Selling Points
- β Zero config connection handling β opens late, closes early, threadsafe.
- β Strongly-typed mapping using precompiled property setters (like Dapper).
- β Full support for SQL Server, PostgreSQL, MySQL, MariaDB, Oracle, Sqlite, Firebird, CockroachDB.
- β Multitenancy built in, with per-tenant context resolution.
- β Full control of SQL β build it yourself, or use the helper APIs.
- β Audit fields (CreatedBy, UpdatedOn, etc.) auto-filled, yet customizable.
- β
Param syntax and quoting automatically adapted per DB (
:
,@
,?
; backticks, brackets, or quotes). - β Stored Procedure support that adapts syntax to each DBβs quirks.
- β JSON columns auto-serialized/deserialized.
- β No dependency on any particular provider β just ADO.NET compliant drivers.
- β Transactions mapped to intent, not vendor-specific quirks.
- β Threadsafe DatabaseContext β can be used as a singleton.
- β Pluggable entity helpers that reduce boilerplate, but are totally optional.
- β Works with your schema, whether it uses real primary keys or surrogate ones.
π‘ Real Questions, Real Answers
Q: Does it help with database migrations like EF?
A: No. It assumes your schema is source-controlled and managed by DBAs or DevOps β not embedded in your code.
Q: What if I use stored procedures?
A: Great! Pengdows.CRUD fully supports them β including syntax adjustments for each DB vendor.
Q: Can I switch DBs easily?
A: Yes. Just change the connection string and DbMode
. It will handle provider-specific syntax and behavior.
Q: What about connection pooling?
A: Fully supported via ADO.NETβs built-in pooling. No special code needed.
Q: Is this fast? Is it secure?
A: Yes. We avoid reflection at runtime, precompile mappings, and use parameterized queries. Itβs as fast as Dapper but with fewer gotchas.
Q: Can I use pseudokeys?
A: Absolutely. We recommend meaningful keys, but donβt force them.
Q: Who maintains this? Is it just one dev?
A: Currently maintained by the original author with plans for long-term support and community contributions. Designed for clarity and extensibility, so others can contribute safely.
π¦ Installation
dotnet add package pengdows.crud
π Quick Example
var dbContext = new DatabaseContext(...);
var sqlContainer = dbContext.CreateSqlContainer();
var tableName = dbContext.WrapObjectName("dbo.Customer");
sqlContainer.Query.Append("SELECT count(*) from ")
.Append(tableName);
var count = sqlContainer.ExecuteNonQuery();
Want typed helper access?
var helper = new EntityHelper<Customer, Guid>(dbContext);
var customers = await helper.LoadAllAsync();
π§ Designed by Devs Who Know SQL
Pengdows.CRUD was built by a developer whoβs spent decades fighting ORMs, fixing cross-database bugs, and writing serious backend systems.
It hides nuisance-level complexity (MySQL datetime quirks, SQL Server’s indexed views, LocalDB timeouts…) but stays out of your way. You are always in control.
π£ Get Involved
- GitHub: github.com/pengdows/pengdows.crud
- Docs: github.com/pengdows/pengdows.crud/wiki
- License: MIT
If you value correctness, predictability, and performance β and hate fighting your tools β give it a shot.
π Star it.Β Use it. Tell us what breaks.