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.
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
- 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
To learn how to add the MongoDB Realm .NET SDK library as a dependency to your .NET application, see Install Realm for .NET.
To learn how to add the MongoDB Realm .NET SDK library as a dependency to your application, see Install Realm for .NET.
The Realm Data Model¶
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.
Building C# classes to represent the data you store in realm ensures data consistency when serializing/deserializing and makes working with the data simpler.
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 Migrations.