Method AddDeleteIfVersion
AddDeleteIfVersion(string, MapValue, RowVersion, DeleteOptions, bool)
Adds a DeleteIfVersionOperation to the collection.
Declaration
public WriteOperationCollection AddDeleteIfVersion(string tableName, MapValue primaryKey, RowVersion version, DeleteOptions options, bool abortIfUnsuccessful = false)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tableName | Table name. |
| MapValue | primaryKey | Primary key of the row to delete. |
| RowVersion | version | Row version to match. |
| DeleteOptions | options | Options for the Delete operation. |
| bool | abortIfUnsuccessful | (Optional) If true and
this Delete operation fails, it will cause the entire transaction
to abort, see
WriteManyAsync(WriteOperationCollection, WriteManyOptions, CancellationToken). |
Returns
| Type | Description |
|---|---|
| WriteOperationCollection | A reference to this instance after the Delete operation was added. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | If
tableName is null or invalid or
primaryKey is null or
version is null or
options contains invalid values. |
AddDeleteIfVersion(string, MapValue, RowVersion, bool)
Adds a DeleteIfVersionOperation to the collection.
Declaration
public WriteOperationCollection AddDeleteIfVersion(string tableName, MapValue primaryKey, RowVersion version, bool abortIfUnsuccessful = false)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tableName | Table name. |
| MapValue | primaryKey | Primary key of the row to delete. |
| RowVersion | version | Row version to match. |
| bool | abortIfUnsuccessful | (Optional) If true and
this Delete operation fails, it will cause the entire transaction
to abort, see
WriteManyAsync(WriteOperationCollection, WriteManyOptions, CancellationToken). |
Returns
| Type | Description |
|---|---|
| WriteOperationCollection | A reference to this instance after the Delete operation was added. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | If
tableName is null or invalid or
primaryKey is null or
version is null. |
AddDeleteIfVersion(MapValue, RowVersion, DeleteOptions, bool)
Adds a DeleteIfVersionOperation to the collection.
Declaration
public WriteOperationCollection AddDeleteIfVersion(MapValue primaryKey, RowVersion version, DeleteOptions options, bool abortIfUnsuccessful = false)
Parameters
| Type | Name | Description |
|---|---|---|
| MapValue | primaryKey | Primary key of the row to delete. |
| RowVersion | version | Row version to match. |
| DeleteOptions | options | Options for the Delete operation. |
| bool | abortIfUnsuccessful | (Optional) If true and
this Delete operation fails, it will cause the entire transaction
to abort, see
WriteManyAsync(string, WriteOperationCollection, WriteManyOptions, CancellationToken). |
Returns
| Type | Description |
|---|---|
| WriteOperationCollection | A reference to this instance after the Delete operation was added. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | If
primaryKey is null or
version is null or
options contains invalid values. |
AddDeleteIfVersion(MapValue, RowVersion, bool)
Adds a DeleteIfVersionOperation to the collection.
Declaration
public WriteOperationCollection AddDeleteIfVersion(MapValue primaryKey, RowVersion version, bool abortIfUnsuccessful = false)
Parameters
| Type | Name | Description |
|---|---|---|
| MapValue | primaryKey | Primary key of the row to delete. |
| RowVersion | version | Row version to match. |
| bool | abortIfUnsuccessful | (Optional) If true and
this Delete operation fails, it will cause the entire transaction
to abort, see
WriteManyAsync(string, WriteOperationCollection, WriteManyOptions, CancellationToken). |
Returns
| Type | Description |
|---|---|
| WriteOperationCollection | A reference to this instance after the Delete operation was added. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | If
primaryKey is null or
version is null. |