Connecting to MongoDB in C#
Learn about the C# driver for MongoDB and how to use it to connect to your C# applications.
Connecting to MongoDB in C#
Unit Overview
In this unit, you will be introduced to the C# driver for MongoDB and learn how it's used to connect to your C# applications. First, we'll install the MongoDB C# driver by using the NuGet package manager. Next, we'll explore best practices when creating a MongoClient. Finally, we will troubleshoot a few of the most common connection issues.
Prerequisite
Lessons in This Unit
- Lesson 01: Using MongoDB C# Client Libraries
- Lesson 02: Connecting to an Atlas Cluster in C# Applications
- Lesson 03: Troubleshooting a MongoDB Connection in C# Applications

Caleb Thompson | Staff Engineer
Caleb is a Staff Engineer at MongoDB, working primarily on Realm education and documentation. He doesn't recall his life before MongoDB, but has been told he has previously served as an architect, software engineer, API designer, and curriculum design engineer. Caleb also loves teaching, rafting, wood working, and geology.

Parker Faucher | University Curriculum Engineer
Parker is a Curriculum Engineer on the Education team at MongoDB. Prior to joining MongoDB, he helped maintain a world class developer bootcamp that was offered in multiple universities. He is a self taught developer who loves being able to give back to the community that has helped him so much.

Daniel Curran | Senior Curriculum Engineer
Daniel is a Senior Curriculum Designer at MongoDB. Before joining MongoDB, he worked as an Instructional Designer and Content Developer specializing in technical content for a host of international clients. Daniel's goal is to remove obstacles so learners can feel confident on their journey to become masters of MongoDB.