public void Remove(long id) { var realmItem = GetById(id); using (var transaction = _currentRealm.BeginWrite()) { try { _currentRealm.Remove(realmItem); transaction.Commit(); } catch (Exception) { transaction.Rollback(); } } }
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); }); }
public async Task RemoveAsync <T>(T item, ITransaction transaction) where T : RealmObject { Realms.Realm realm = await GetRealmAsync(); await this.RunInTransactionAsync(_ => realm.Remove(item), transaction); }