Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Getting Started With Queryable Encryption in the MongoDB C# Driver

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

Getting Started with MongoDB Atlas and Azure Functions using .NET and C#

So you need to build an application with minimal operating costs that can also scale to meet the growing demand of your business. This is a perfect scenario for a serverless function, like those built with Azure Functions. With serverless functions you can focus more on the application and less on the infrastructure and operations side of things. However, what happens when you need to include a database in the mix?

In this tutorial we’ll explore how to create a serverless function with Azure Functions and the .NET runtime to interact with MongoDB Atlas. If you’re not familiar with MongoDB, it offers a flexible data model that can be used for a variety of use cases while being integrated into most application development stacks with ease. Scaling your MongoDB database and Azure Functions to meet demand is easy, making them a perfect match.

Read More

Interact with a GraphQL API from a .NET Core Application

When it comes to C#, it’s not too difficult or time-consuming to create or consume RESTful APIs. In fact, I recently published a tutorial that demonstrated how to create a RESTful API with .NET Core using MongoDB as the NoSQL database.

RESTful APIs are great, but what happens when you want to work with GraphQL and query your APIs rather than just consume them?

In this tutorial, we’ll see how to use .NET Core to interact with a GraphQL API. To make things easier, we’ll generate our API with MongoDB App Services.

Read More

Using LINQ to Query MongoDB in a .NET Core Application

If you’ve been keeping up with my series of tutorials around .NET Core and MongoDB, you’ll likely remember that we explored using the Find operator to query for documents as well as an aggregation pipeline. Neither of these previously explored subjects are too difficult, but depending on what you’re trying to accomplish, they could be a little messy. Not to mention, they aren’t necessarily “the .NET way” of doing business.

This is where LINQ comes into the mix of things!

With Language Integrated Queries (LINQ), we can use an established and well known C# syntax to work with our MongoDB documents and data.

In this tutorial, we’re going to look at a few LINQ queries, some as a replacement to simple queries using the MongoDB Query API and others as a replacement to more complicated aggregation pipelines.

Read More

Joining Collections in MongoDB with .NET Core and an Aggregation Pipeline

If you’ve been keeping up with my .NET Core series on MongoDB, you’ll remember that we explored creating a simple console application as well as building a RESTful API with basic CRUD support. In both examples, we used basic filters when interacting with MongoDB from our applications.

But what if we need to do something a bit more complex, like join data from two different MongoDB collections?

In this tutorial, we’re going to take a look at aggregation pipelines and some of the ways that you can work with them in a .NET Core application.

Read More

Create a RESTful API with .NET Core and MongoDB

If you’ve been keeping up with my development content, you’ll remember that I recently wrote Build Your First .NET Core Application with MongoDB Atlas, which focused on building a console application that integrated with MongoDB. While there is a fit for MongoDB in console applications, many developers are going to find it more valuable in web applications.

In this tutorial, we’re going to expand upon the previous and create a RESTful API with endpoints that perform basic create, read, update, and delete (CRUD) operations against MongoDB Atlas.

Read More

Extract the Version Information of a Game with Unity and C#

If you play a lot of games, you probably noticed at some point in time that the version number or build number of the game is often presented clearly on the screen. This is often not by accident and is instead a way to show users that they are using the correct version of your game. Not only that, but it can help from a development perspective as well. For example, have you ever built a game and had a bunch of different builds floating around on your computer? Imagine trying to figure out which build is correct without seeing any build or version information!

In this tutorial we’re going to see how to very easily extract the build information defined in the project settings of a Unity game.

Read More