Overview
Welcome to the Infrastructure Database Libs documentation
Motivation
The goal of the wemogy.Infrastructure.Database library, is to define a unified way to abstract a database. The abstraction should be provider independent, which means that the actual implementation of the IDatabaseClient can change without changing the rest of the implementation. Using this approach allows us to declare our interfaces once, generate an actual implementation at runtime and run the same source code against several database providers (e.g. InMemory, Azure Cosmos DB, MongoDB).
Unit-testing database implementations should be automated, regardless of the database provider under test. The tests should be written in an abstract way and should be successful, regardless if a cosmos/mongo-db or in-memory database is being tested.
Features
- Provider-independent repositories for Azure Cosmos DB, MongoDB and an in-memory implementation (see Database Providers).
- A rich repository API: CRUD, querying, sorting & pagination.
- Soft delete that hides deleted entities from all reads.
- Read & property filters for centralized, secure-by-default data access.
- Optimistic concurrency via the
[ETag]attribute, with automatic retries. - Multi-tenancy through transparent partition-key prefixing.
- Provider-independent error handling.
New here? Start with Installation and Getting Started.