コード例 #1
0
        public async Task UpdateAsync(TEntity entity, TVersion knownVersion, CancellationToken ct)
        {
            if (entity.RowVersion.CompareTo(knownVersion) != 0)
            {
                // TODO: use a better error strategy
                throw new DbUpdateConcurrencyException();
            }

            await _repository.UpdateAsync(entity, ct);
        }
コード例 #2
0
 public Task UpdateAsync(TEntity entity, CancellationToken ct)
 => _repository.UpdateAsync(entity, ct);