0
Guys I’m having trouble using Realm, in . NET with Xamarin.
I can usually add, update or delete objects from a Realm. But like the pro version . NET does not have a copyFromRealm, here comes my question.
My method should open Remake, query the object and return that object so I can work outside the data layer.
Even using Deepcloner (nuget), Realm keeps giving an Exception saying that the Realm is closed, but it’s even because I’m using, as the documentation suggests.
It is possible to make a copy of the Realm object before closing it so that I can work the data on the top layer. This data will be read-only and I won’t change it, just read it.
Code that the method makes.
using(var realm = Realm.GetInstance(config))
{
var data = realm.All<DadosUsuario>().FirstOrDefault().ShallowCopy();
}