Persistence
Use Genocs.Persistence.MongoDB for MongoDB clients, databases, and repositories wired through the Genocs builder.
Contents On this page
Overview
Genocs.Persistence.MongoDB provides MongoDB connectivity and repository wiring for Genocs-based services: IMongoClient, IMongoDatabase, generic IMongoRepository<TEntity>, session support, and optional collection seeding—driven from a single mongoDb configuration section.
Installation
dotnet add package Genocs.Persistence.MongoDB
Dependencies
- Genocs.Core
- MongoDB driver (pulled in by the package as appropriate for the version you use)
Usage
Extend IGenocsBuilder with Mongo registration helpers (for example AddMongoWithRegistration()) during application startup. See the Genocs.Persistence.MongoDB v9.0 reference for a full Program.cs example, appsettings.json schema, and troubleshooting.
Reference documentation
- Genocs.Persistence.MongoDB (v9.0) — install recipe, configuration keys, and behavior notes.
Related: Library · Choose a docs version