1
Есть ли способ использования Realm от realm.io для приложения на рабочем столе (WinForms/WPF)?Realm for Desktop apps
Я попытался следующий код:
public partial class Form1 : Form
{
private Realm realm;
public Form1()
{
InitializeComponent();
this.realm = Realm.GetInstance();
}
private void button1_Click(object sender, EventArgs e)
{
realm.Write(() =>
{
var jim = realm.CreateObject<Person>();
var myDog = realm.CreateObject<Dog>();
myDog.Name = "Fido";
myDog.Owner = jim;
});
}
}
public class Dog : RealmObject
{
public string Name { get; set; }
public int Age { get; set; }
public Person Owner { get; set; }
}
public class Person : RealmObject
{
public string Name { get; set; }
public IList<Dog> Dogs { get; }
}
, но при его запуске VS показывает мне PlatformNotSupportedException
Nope: https://github.com/realm/realm-dotnet/issues/509#issuecomment-250051237 и https://github.com/realm/realm-core/issues/2036 и https: // github .com/Realm/сфера одножильный/вопросы/2059 – EpicPandaForce