---
title: MongoDB persistence in Cratis Arc
editUrl: https://github.com/Cratis/Arc/edit/main/Documentation/backend/csharp/mongodb/index.md
description: Use MongoDB document storage in Cratis Arc with injectable collections, BSON mapping, tenant-aware connections, and shared change-stream observation.
lastUpdated: 2026-11-09T00:00:00.000Z
---


Cratis Arc's MongoDB integration gives commands and queries access to document storage through the MongoDB driver. Add `Cratis.Arc.MongoDB` to inject typed collections and configure how your .NET types are stored as BSON, MongoDB's binary document format. You can use it without Chronicle or event sourcing.

## Start with a read

Follow [getting started](/arc/backend/csharp/mongodb/getting-started/) to install the package, connect your host to a database, and resolve an `IMongoCollection<T>`. Get ordinary reads working before adding live queries: those use change streams and need a replica set or sharded cluster with permission to watch the database.

## Model your documents

- [Concepts](/arc/backend/csharp/mongodb/concepts/): store strongly typed values without wrapper documents.
- [Serializers](/arc/backend/csharp/mongodb/serializers/): understand BSON representations, including date precision and Guid formats.
- [Naming policies](/arc/backend/csharp/mongodb/naming-policies/): choose collection and member names before writing data.
- [Class mapping](/arc/backend/csharp/mongodb/class-mapping/): customize individual document types.
- [Convention packs](/arc/backend/csharp/mongodb/convention-packs/): apply and filter shared conventions.
- [Geospatial types](/arc/backend/csharp/mongodb/geospatial/): store GeoJSON and construct driver query geometry.

## Add live reads and tenancy

- [Observe collections](/arc/backend/csharp/mongodb/observing-collections/): observations over the shared change stream, lifetime, and errors.
- [Watch multiple collections](/arc/backend/csharp/mongodb/change-stream-watcher/): shared database change streams and joined results.
- [Tenancy](/arc/backend/csharp/mongodb/tenancy/): database naming and scope boundaries.
- [Connection resolution](/arc/backend/csharp/mongodb/connection-resolution/): choose a server, database, or credentials for each tenant.
- [Named sinks](/arc/backend/csharp/mongodb/named-sinks/): read read models a Chronicle named sink stores on another MongoDB server.

Graph data lives in Neo4j rather than MongoDB; the [Neo4j integration](/arc/backend/csharp/neo4j/) gives the same tenant-aware convenience for a property graph.

Observation refreshes query results when stored documents change; it is not an event log. Storing a document does not append Chronicle events. If you need event sourcing as well, continue with the separate [Chronicle integration](/arc/backend/csharp/chronicle/).
