⬡Forge.
Repository
A production-grade, database-agnostic repository pattern for .NET. One clean API - SQL Server, PostgreSQL, Oracle, MySQL and more. Drop in, configure, ship.
Package Ecosystem
Install the core package and one provider - that's all you need.
Interfaces, base models, criteria pattern, Unit of Work, and EF Core abstractions. Always install this first.
What's Included
Everything you need for production data access — nothing you don't.
Database Agnostic Core
One API across SQL Server, PostgreSQL, Oracle, MySQL and MariaDB. Swap providers with a single DI call.
Criteria Pattern
Encapsulate complex queries in dedicated, unit-testable objects. Clean services, reusable logic.
Full Audit Trail
IAuditableBaseModel with CreatedOn, ModifiedOn, CreatedBy, ModifiedBy and soft-delete built in.
Connection Pooling
Fine-grained pooling control via ForgeDbContextPoolingOptions. Min/max pool size per provider.
Resilience Built-in
Configurable retry policies, command timeouts and spatial extension support per provider.
Raw SQL Escape Hatch
When ORMs fall short — execute raw queries and commands with full async and cancellation support.
Unit of Work
Coordinate multi-repository transactions. One SaveChangesAsync commits all changes atomically.
.NET 10 Targeting
Built for the latest runtime. Takes full advantage of modern C# patterns and async best practices.
Provider Support
Consistent feature coverage across all database providers.
| Feature | SQL Server | PostgreSQL | Oracle | MySQL / MariaDB |
|---|---|---|---|---|
| CRUD Operations | ✓ | ✓ | ✓ | ✓ |
| Unit of Work | ✓ | ✓ | ✓ | ✓ |
| Criteria Pattern | ✓ | ✓ | ✓ | ✓ |
| Connection Pooling | ✓ | ✓ | ✓ | ✓ |
| Raw SQL | ✓ | ✓ | ✓ | ✓ |
| Retry Policy | ✓ | ✓ | ✓ | ✓ |
| Spatial Support | ✓ | ✓ | ✓ | ✓ |
| Audit Trail | ✓ | ✓ | ✓ | ✓ |
| Soft Delete | ✓ | ✓ | ✓ | ✓ |
| Custom History | – | ✓ | – | – |

