Home

Awesome

[!WARNING] We announced the deprecation of Atlas Device Sync + Realm SDKs in September 2024. For more information please see:

For a version of realm-dotnet without sync features, install version 20 or see the "community" branch.

<picture> <source srcset="./media/logo-dark.svg" media="(prefers-color-scheme: dark)" alt="realm by MongoDB"> <img src="./media/logo.svg" alt="realm by MongoDB"> </picture>

Realm is a mobile database that runs directly on phones, tablets or wearables.

This repository holds the source code for the .NET / C# versions of Realm. Currently, we support all major mobile and desktop operating systems, such as iOS, Android, UWP, macOS, Linux, and Windows. For a full list of supported platforms and their versions, check out the Platform and Framework Compatibility section in the documentation.

Features

Getting Started

Please see the detailed instructions in our User Guide to add Realm to your solution.

Documentation

The documentation can be found at mongodb.com/docs/atlas/device-sdks/sdk/dotnet/. The API reference is located at mongodb.com/docs/realm-sdks/dotnet/latest/.

Getting Help

Nightly builds

If you want to test recent bugfixes or features that have not been packaged in an official release yet, you can use the preview releases published after every commit to our private NuGet feed. The source URL you need to specify for our feed is https://s3.amazonaws.com/realm.nugetpackages/index.json. Refer to this guide for instructions on adding custom sources to the NuGet Package Manager.

Building Realm

We highly recommend using our pre-built binaries via NuGet but you can also build from source.

Prerequisites:

Instructions:

  1. Download and build the native libraries using the instructions in wrappers/README.md
  2. Open the Realm.sln in Visual Studio
  3. Build Realm, Realm.Fody and Realm.SourceGenerator
  4. Build and run the tests for the relevant platforms.

If you are actively testing code against the Realm source, see also the unit test projects and other tests under the Tests folder.

Examples

Some minimal examples of Realm use can be found in the examples folder:

It is possible to find additional (and more complex) examples that use Atlas Device Sync in the realm-dotnet-samples repo.

Contributing

See CONTRIBUTING.md for more details!

Code of Conduct

This project adheres to the MongoDB Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to community-conduct@mongodb.com.

License

Realm .NET and Realm Core are published under the Apache License 2.0.

Feedback

If you use Realm and are happy with it, all we ask is that you please consider sending out a tweet mentioning @realm to share your thoughts!

And if you don't like it, please let us know what you would like improved, so we can fix it!

<img style="width: 0px; height: 0px;" src="https://3eaz4mshcd.execute-api.us-east-1.amazonaws.com/prod?s=https://github.com/realm/realm-dotnet#README.md">