I'm having problems using Realm in .NET with Xamarin.
I can usually add, update, or delete objects from a Realm. But as the pro version .NET does not have a copyFromRealm, here comes my doubt.
My method should open the realm, query the object and return that object to work outside the data layer.
Even though I'm using DeepCloner (nuget), Realm gives me an exception saying that Realm is closed, but it's because I'm using using, as the documentation suggests.
Is it possible for me to make a copy of the Realm object before closing it so that I can work the data in the top layer. These data will be read-only and I will not change them, just read them.
Code that the method does.
using(var realm = Realm.GetInstance(config))
{
var data = realm.All<DadosUsuario>().FirstOrDefault().ShallowCopy();
}