예제 #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();
                }
            }
        }
예제 #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); });
 }
예제 #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);
        }