/// <inheritdoc /> public async Task RemoveAsync(TEntity entity, CancellationToken cancellation = default(CancellationToken)) { IAsyncStoreContracts.RemoveAsync(entity); cancellation.ThrowIfCancellationRequested(); await this.store.RemoveAsync(entity, cancellation).DontMarshallContext(); }
/// <inheritdoc /> public Task RemoveAsync <TEntity>( TEntity entity, CancellationToken cancellation = default(CancellationToken)) where TEntity : class { IAsyncStoreContracts.RemoveAsync(entity); cancellation.ThrowIfCancellationRequested(); return(this.connection.DeleteAsync(entity, cancellation)); }
/// <inheritdoc /> public async Task RemoveAsync <TEntity>( TEntity entity, CancellationToken cancellation = default(CancellationToken)) where TEntity : class { IAsyncStoreContracts.RemoveAsync(entity); var store = await this.GetStoreAsync <TEntity>(cancellation).DontMarshallContext(); await store.RemoveAsync(entity, cancellation).DontMarshallContext(); }
/// <inheritdoc /> public async Task RemoveAsync <TEntity>( TEntity entity, CancellationToken cancellation = default(CancellationToken)) where TEntity : class { IAsyncStoreContracts.RemoveAsync(entity); cancellation.ThrowIfCancellationRequested(); using (await this.Lock.WriterLockAsync(cancellation).DontMarshallContext()) { cancellation.ThrowIfCancellationRequested(); await this.store.RemoveAsync(entity, cancellation).DontMarshallContext(); } }