MongoDB Realm .NET SDK

The MongoDB Realm .NET SDK enables client applications written in C# for the .NET, UWP, and Xamarin platforms to access data stored in local realms and interact with MongoDB Realm services like Functions, MongoDB Data Access, and authentication.

Supported Platforms

Realm supports the following platforms for developing Realm apps for iOS and Android devices:

  • Xamarin.iOS for iOS 9 or later, using native UI or Xamarin Forms
  • Xamarin.Android for API level 16 or later, using native UI or Xamarin Forms
  • Xamarin.Mac for macOS 10.11 or later, using nativeUI or Xamarin Forms
  • .NET Framework 4.6.1 or later for Windows 8.1 or later
  • Universal Windows Platform applications using .NET Standard 2.0 or later (Fall Creators Update)
  • .NET Core 2.0 or later on the following:
    • Ubuntu 16.04 or later
    • Debian 8 or later
    • RHEL 7.1 or later
    • macOS 10.11 or later
    • Windows 8.1 or later

You can use the following development environments to build Realm apps with the .NET SDK:

  • Visual Studio 2015 Update 2 or higher for Windows
  • Visual Studio for Mac 7.0 or higher


To learn how to add the MongoDB Realm .NET SDK library as a dependency to your application, see Install Realm for .NET.

Realm Data Models

You can store a wide variety of data within realms stored on your device, and if you enable Realm Sync, updates to that data are available across multiple client devices. Data models are classes defined in your code and in realm schemas.

For information about the structure of data you can store in realms, see Realms, Objects, and Relationships.

Building C# classes to represent the data you store in realm ensures data consistency when serializing/deserializing and makes working with the data simpler.

Work with a Realm Database

Once you have defined the data model(s) for your application, you can write and read data to and from your realms.

To learn how to query for data in local realms, see Query Engine.

To learn about the results returned from realm queries, see Collections.

Mobile application development can be complicated by threading. To learn how to work with Realm across threads in your application, see Threading.

Work with MongoDB Realm

The .NET SDK also connects your Realm client application with your Realm app’s backend services, including Functions, Services, Webhooks, Realm Sync, and built-in third-party authentication.

To learn how to connect to a MongoDB Realm app to call Functions, query data in an instance of MongoDB Atlas, and synchronize data in realms, see Call a Function.

To learn how to handle schema updates in your client application, see Migrations.