Exemplo n.º 1
0
        /// <inheritdoc />
        public async Task UpdateAsync(TEntity entity, CancellationToken cancellation = default(CancellationToken))
        {
            IAsyncStoreContracts.UpdateAsync(entity);

            cancellation.ThrowIfCancellationRequested();
            await this.store.UpdateAsync(entity, cancellation).DontMarshallContext();
        }
        /// <inheritdoc />
        public Task UpdateAsync <TEntity>(
            TEntity entity, CancellationToken cancellation = default(CancellationToken))
            where TEntity : class
        {
            IAsyncStoreContracts.UpdateAsync(entity);

            cancellation.ThrowIfCancellationRequested();
            return(this.connection.UpdateAsync(entity, cancellation));
        }
Exemplo n.º 3
0
        /// <inheritdoc />
        public async Task UpdateAsync <TEntity>(
            TEntity entity, CancellationToken cancellation = default(CancellationToken))
            where TEntity : class
        {
            IAsyncStoreContracts.UpdateAsync(entity);

            var store = await this.GetStoreAsync <TEntity>(cancellation).DontMarshallContext();

            await store.UpdateAsync(entity, cancellation).DontMarshallContext();
        }
Exemplo n.º 4
0
        /// <inheritdoc />
        public async Task UpdateAsync <TEntity>(
            TEntity entity, CancellationToken cancellation = default(CancellationToken))
            where TEntity : class
        {
            IAsyncStoreContracts.UpdateAsync(entity);

            cancellation.ThrowIfCancellationRequested();
            using (await this.Lock.WriterLockAsync(cancellation).DontMarshallContext())
            {
                cancellation.ThrowIfCancellationRequested();
                await this.store.UpdateAsync(entity, cancellation).DontMarshallContext();
            }
        }