Skip to main content
net8.0.NETStandard2.0

Instance-based facade over Dapper.SimpleCRUD: one lazily created, isolated SimpleCRUD engine per dialect, so several databases (and your own SimpleCRUD code) coexist in one process.

Published
Sep 30, 2026
19d ago
Total Downloads
0
0

Install

dotnet add package EzOdata.SimpleCrud --version 1.0.0
ProductVersions
.NET
net8.0
.NET Standard
netstandard2.0

README

EzOdata + Dapper.SimpleCRUD

Two packages built on Dapper.SimpleCRUD, which they use unmodified.

EzOdata.SimpleCrud: several SimpleCRUD dialects in one process

SimpleCRUD keeps its dialect in static state, so one process normally speaks one dialect. This package gives each dialect its own isolated SimpleCRUD engine, created on first use. SQL Server, PostgreSQL, MySQL and SQLite can then run side by side, next to your existing SimpleCRUD code, which it never touches.

var pg  = SimpleCrud.For(SimpleCRUD.Dialect.PostgreSQL).WithConnection(() => new NpgsqlConnection(pgCs)).Build();
var sql = SimpleCrud.For(SimpleCRUD.Dialect.SQLServer).WithConnection(() => new SqlConnection(sqlCs)).Build();

await pg.InsertAsync(customer);
var order = await sql.GetAsync<Order>(42);

// or with keyed DI
services.AddSimpleCrud("warehouse", SimpleCRUD.Dialect.SQLServer, _ => new SqlConnection(sqlCs));

Your existing SimpleCRUD POCOs and attributes work unchanged. The overhead is about 1.06Ă— a direct SimpleCRUD call. Supports SimpleCRUD 2.3.x and 2.4.x on .NET 8+; on netstandard2.0 it falls back to one dialect per process.

EzOdata.SimpleCrud.AspNetCore: instant OData/REST API with SimpleCRUD overrides

ez-odata-api serves every table of a database as a governed OData v4 / REST API. This package lets you take over any table with an ordinary SimpleCRUD entity and typed hooks for validation, auditing, soft delete, or replacing an operation outright.

builder.Services.AddEzOData(ez => ez.AddService("crm", s => s.UsePostgreSql(connection)));  // stock ez-odata
builder.Services.ExtendEzOData(x => x.Service("crm", crm => crm
    .Table<Customer, CustomerHandler>()                                                        // handler class (DI)
    .Table<Order>(t => t.BeforeInsert((o, ctx) => { if (o.Total <= 0) ctx.Reject("Total must be positive."); }))));
app.MapEzOData("/api/odata");
  • Writes go through SimpleCRUD in one transaction, and hooks share it.
  • ez-odata's role rules and row filters still apply, and hooks can't widen them.
  • Composite keys are supported, and UsePropertyNames() exposes C# property names in the API.
  • ctx.OnCommitted(...) runs side effects only after a successful commit.

Docs, tests and samples: https://github.com/YOLOVibeCode/ez-odata-api.Dapper.SimpleCRUD · Apache-2.0

Changes from Previous Version

No structural changes between v1.0.0-rc.1 and v1.0.0.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

Compatibility metadata lists 2 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.