Skip to main content

Installation

The library is split into a provider-independent core package and one package per database provider. Install the core package together with the provider you want to use.

PackageDescription
Wemogy.Infrastructure.Database.CoreProvider-independent abstractions (entities, repositories, attributes, filters). Referenced transitively by every provider package.
Wemogy.Infrastructure.Database.CosmosAzure Cosmos DB implementation.
Wemogy.Infrastructure.Database.MongoMongoDB implementation.
Wemogy.Infrastructure.Database.InMemoryIn-memory implementation, primarily for unit tests.

Supported frameworks

The packages target .NET 8, .NET 9 and .NET 10.

Breaking change

Starting with the next major version, the libraries no longer target frameworks older than .NET 8. Upgrade your consuming projects to at least net8.0 before updating.

Adding a provider package

Add the provider package you need; it pulls in the core package automatically.

Azure Cosmos DB
dotnet add package Wemogy.Infrastructure.Database.Cosmos
MongoDB
dotnet add package Wemogy.Infrastructure.Database.Mongo
In-Memory (unit tests)
dotnet add package Wemogy.Infrastructure.Database.InMemory

A common setup references the in-memory package in your test project and the real provider (Cosmos or Mongo) in your application project, so the exact same repository code can be exercised against an in-memory database during tests. See Database Providers for provider-specific details.