private async Task <int> IncrementRowVersionAsync(IDbConnection connection, string tableName, long rowId, IDbTransaction txn) { var rowVersion = await _crudProvider.GetWhereAsync <RowVersion>(connection, new { tableName, rowId }, txn) ?? new RowVersion() { TableName = tableName, RowId = rowId }; rowVersion.Version++; await _crudProvider.SaveAsync(connection, rowVersion, txn : txn); return(rowVersion.Version); }