The official .NET and C# driver for MongoDB
open sourceApache-2.0free
The MongoDB .NET/C# Driver is MongoDB's official library for working with MongoDB from C# and other .NET languages, published on NuGet as MongoDB.Driver with its BSON library, MongoDB.Bson. It connects to MongoDB deployments and Atlas, reads and writes untyped BsonDocuments or typed C# classes, runs CRUD and aggregation pipelines, manages indexes, runs database commands, works with time series collections, MongoDB Search and Vector Search, and handles serialization, authentication, encryption, logging and monitoring. MongoDB maintains it, under Apache-2.0.
Problems it solves
- connect my ASP.NET Core app to MongoDB
- query MongoDB from C# with typed classes
- run a MongoDB aggregation pipeline from a .NET service
- use MongoDB Atlas vector search from C#
- serialize C# objects to BSON documents
Features
- official MongoDB driver for C# and .NET, on NuGet as MongoDB.Driver
- works with untyped BsonDocument or typed C# classes
- CRUD, aggregation pipelines, indexes and database commands
- MongoDB Search and Vector Search queries on Atlas
- time series collections
- BSON serialization library (MongoDB.Bson)
- authentication, encryption, logging and monitoring
Alternatives
The same job
These do what MongoDB .NET/C# Driver does.
- CSRedis .NET client for Redis, Redis Sentinel and Redis Cluster
