Author: Luce Carter

Migrating From PostgreSQL to MongoDB in a .NET EF Core Application

May 1, 2025 Luce Carter

For many reasons—including scalability, flexibility, and modernization—more and more development teams are looking to migrate away from PostgreSQL to MongoDB. In the past, these teams might have been hesitant if they used Entity Framework Core (EF Core) as their object relational mapper (ORM).

With EF Core being one of the most popular ORMs for .NET development, we received a lot of requests from the community for a provider, and so did Microsoft! So it made sense for MongoDB to develop a provider for EF Core. This went generally available (GA) in May 2024 and has been greatly received by the community.

Plus, developers can now use MongoDB's Relational Migrator, a free tool that uses smart algorithms and GenAI to streamline migrating from legacy relational databases to MongoDB, accelerating application modernization initiatives. So now is a great time to take a look at how you too can reap the benefits of all this by migrating your .NET application that uses PostgreSQL with EF Core, to use the MongoDB EF Core Provider.

In this tutorial, we will start off with a simple application that uses PostgreSQL as the database under the hood, and update it to still take advantage of EF Core but use MongoDB instead. So let's get started!

Read More

Getting Started With Queryable Encryption in the MongoDB C# Driver

April 22, 2025 Luce Carter

With the release of MongoDB 7.0 in August 2023, we introduced a feature called Queryable Encryption, the first of its kind. With queryable encryption, your data is encrypted, even at rest, with the server unable to read it either but still able to execute queries against it. You can specify what fields to encrypt so you can encrypt as much or as little of your document as you need.

The great news is, not only is this available for all tiers, but it is supported in our C# driver too!

In this tutorial, we are going to add queryable encryption to a healthcare application, ensuring that private information, such as social security number (SSN) and date of birth, is encrypted.

Read More