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); }
public Task UpdateAsync(TEntity entity, CancellationToken ct) => _repository.UpdateAsync(entity, ct);