Skip to ContentSkip to Content
Installation

Installation

Forge.Repository targets .NET 10 and is published to NuGet.org . Installation is a two-step process: install the core package, then add one provider package for your target database.


Requirements

RequirementMinimum version
.NET SDK10.0
Entity Framework Core10.0.x
C# language version13 (latest)

Step 1 — Install the Core Package

The core package is always required regardless of which database you use. It contains all interfaces, base models, the criteria pattern, and the unit of work contract.

dotnet add package Forge.Repository

Step 2 — Install a Provider Package

Install exactly one provider package matching your target database. Each provider pulls in the appropriate EF Core database driver as a transitive dependency.

dotnet add package Forge.Repository.SqlServer

Pulls in Microsoft.EntityFrameworkCore.SqlServer and Microsoft.Data.SqlClient.

Version pinning — always install the same version for both Forge.Repository and your provider package. For alpha builds, pin to the exact version rather than using a floating range to avoid unexpected breaking changes.

dotnet add package Forge.Repository --version 10.0.0 dotnet add package Forge.Repository.SqlServer --version 10.0.0

Typical Project Layout

After installation your project will look something like this:

        • OrderConfiguration.cs
        • ProductConfiguration.cs
        • CustomerConfiguration.cs
      • AppDbContext.cs
      • Order.cs
      • Product.cs
      • Customer.cs
      • ActiveOrdersCriteria.cs
      • OrderService.cs
    • Program.cs
    • MyApp.csproj

Verifying Installation

Run a quick build to confirm everything resolves:

dotnet build

If you see CS0246 errors about missing types, make sure both packages are at the same version and your TargetFramework is set to net10.0.