Esempio n. 1
0
 public void AddComic(ComicData comicData)
 {
     using (var trans = Realm.BeginWrite())
     {
         Realm.Add(comicData, true);
         trans.Commit();
     }
 }
Esempio n. 2
0
        public void DeleteComic(ComicData comicData)
        {
            LocalImageService.DeleteImage(comicData.Id);

            using (var trans = Realm.BeginWrite())
            {
                // Delete pages and then comic (so comic data isn't invalidated before it's pages can be delete)
                Realm.RemoveRange(comicData.Pages);
                Realm.Remove(comicData);

                trans.Commit();
            }
        }