pengdows.crud is now released as opensource

πŸš€ 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

If you value correctness, predictability, and performance β€” and hate fighting your tools β€” give it a shot.

πŸ‘‰ Star it.Β  Use it. Tell us what breaks.

Leave a Reply