Esempio n. 1
0
        public void Remove(long id)
        {
            var realmItem = GetById(id);

            using (var transaction = _currentRealm.BeginWrite())
            {
                try
                {
                    _currentRealm.Remove(realmItem);
                    transaction.Commit();
                }
                catch (Exception)
                {
                    transaction.Rollback();
                }
            }
        }
Esempio n. 2
0
        public void Remove(long id)
        {
            var realmItem = GetById(id);

            _currentRealm.Remove(realmItem);
        }
 public void Remove <T>(T item) where T : RealmObject
 {
     ConfigureInstance();
     _realm.Write(() => { _realm.Remove(item); });
 }
Esempio n. 4
0
        public async Task RemoveAsync <T>(T item, ITransaction transaction) where T : RealmObject
        {
            Realms.Realm realm = await GetRealmAsync();

            await this.RunInTransactionAsync(_ => realm.Remove(item), transaction);
        }