/// <summary> /// Helper method to help me populate the song list at first. /// </summary> void InitializeSongs() { try { realm.Write(() => { realm.Add(new Song { OId = ObjectID.GenerateNewId(), Id = 1, Name = "Sakura Storm", Score = 230 }); realm.Add(new Song { OId = ObjectID.GenerateNewId(), Id = 2, Name = "ACES FOR ACES", Score = 1000 }); realm.Add(new Song { OId = ObjectID.GenerateNewId(), Id = 3, Name = "Be a Hero!", Score = 0 }); realm.Add(new Song { OId = ObjectID.GenerateNewId(), Id = 4, Name = "Emera", Score = 530 }); }); } catch (Exception) { Debug.WriteLine("Something went wrong with initializing initial data in RealmDatabase."); }; }