MongoDB Language Series

MongoDB: The modern database for C#

Get the versatility and flexibility of MongoDB Atlas with the familiarity of C#. Accelerate development with a first-class developer experience.

atlas_query_api

Write strongly-typed queries natively

Construct queries using idiomatic builders — no need to learn a new query language. MongoDB supports LINQ operators, so you can get the data you need with the syntax you know.

Learn more

general_features_tools

Manipulate data using the tools of your choice

Easily work with your data using extensions for VS Code and Visual Studio. Browse your databases, prototype queries, and aggregations with dynamic playgrounds, and query data directly from your IDE.

Learn more

realm_sdk

Build C# apps for native platforms using the Atlas Device SDK for .NET

Build scalable, high-performing mobile apps and games on MAUI and Unity with the Atlas Device .NET SDK. Streamline development with built-in data sync, automate app logic with Atlas Device Sync, and more.

Learn more
mdb_shell

Unlock the full power of MongoDB directly within your EF Core projects

Enhance development with the MongoDB Provider for Entity Framework Core. Build modern, scalable applications using familiar APIs and avoid cloud vendor lock-in.

Learn more

MongoDB Atlas
and C# in action

Learn how you can deploy key MongoDB Atlas features — from aggregation pipelines to data encryption — using C# syntax. Helpful code snippets are included for easy copy and paste.
Try Free
Connect to MongoDB Atlas with the C# driver
Use the officially supported MongoDB C# driver to connect to your MongoDB Atlas cluster and start querying data instantly.
MongoDB C# Driver
Database.cs
Write aggregation pipelines in LINQ
Transform and process your data with MongoDB’s modular, multi-stage aggregation framework. Easily customize and configure your data analysis using familiar LINQ expressions and syntax.
LINQ
LINQ
Programmatically encrypt key data
Add an extra layer of security with client-side field level encryption (CSFLE). Enable CSFLE on the MongoClient and encrypt fields with a JSON schema so sensitive data is never transmitted unencrypted nor seen unencrypted by the MongoDB server.
Client-side field level encryption
JsonSchemaCreator.cs
EncryptedClient.cs

Boost Developer Productivity with the MongoDB Analyzer for .NET

The MongoDB Analyzer for .NET improves productivity for C# developers by reducing the pain of debugging queries. It quickly identifies when unsupported Builders or LINQ expressions are being used in your applications, enabling you to identify and fix any errors prior to runtime.

Pair of hands typing on a laptop

Resources for C# developers

Whether it’s enterprise applications or mobile games, the MongoDB C# driver is ideal for C# applications for all use cases.
Document folder illustration.
Tutorial

Learn about the MongoDB C# driver

Practice using the MongoDB C# driver with this interactive course, where you will learn the basics of building modern applications.

Learn more
Projector screen demo illustration
Tutorial

MongoDB Atlas for .NET frameworks

Check out this step-by-step technical walkthrough for using MongoDB Atlas with .NET and .NET Core.

Learn more

Get started with MongoDB for C#

MongoDB is ideal for busy C# developers—regardless of what framework or tool you use.
GET STARTED WITH ATLAS TODAY
  • Serverless backend
  • Bidirectional sync
  • Intuitive SDK
  • Idiomatic builders
  • Capable extensions
  • Thoughtful tools