realm.CopyToRealm method not available in realm nuget


Is it possible to get unmanaged object from the reaml in Xamarin Android or else is there any alternate way to do same? I have checked same in native android library with CopyToRealm method. I am using Latest nuget i.e. Realm 2.2.1.


No, getting an unmanaged object is not possible and this is by design. The reason is that this can be incredibly costly if done in a generic way, as it could result in thousands of relationships being materialized under the hood. If you want to get an unmanaged copy, I recommend using a tool like AutoMapper where you can configure the rules for copying properties and avoid dumping your entire dataset in memory or getting caught in relationship cycles.


Make your own method and return a copy of the object. This is the easiest and cheapest way by now.