Docs Menu

MongoDB Realm .NET SDK

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

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

  • Xamarin.iOS for iOS 9 or later, using native UI or Xamarin Forms

    Note
    Use Latest Xamarin.iOS Version

    Starting with version 10.3.0 of the MongoDB Realm .NET SDK, you must use Xamarin.iOS version 14.14.2.5 or later.

  • Xamarin.NET 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
  • Unity 2020.3.12f1 (LTS)
Note

The Realm .NET SDK may be compatible with other versions of Unity, but 2020.3.12f1 (LTS) is the version that the Realm team uses for testing and development. We recommend using this version to ensure your project works with Realm and that the install steps match the Integrate Realm with Unity documentation steps since Unity's UI often changes between versions.

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

To learn how to add the MongoDB Realm .NET SDK library as a dependency to your Unity project, see the Integrate Realm with Unity documentation.

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.

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.

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 Schema Versions & Migrations - .NET SDK.

Give Feedback
© 2021 MongoDB, Inc.

About

  • Careers
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2021 MongoDB, Inc.