Method AddDeleteIfVersion
AddDeleteIfVersion(String, MapValue, RowVersion, DeleteOptions, Boolean)
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. |
| Boolean | 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, Boolean)
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. |
| Boolean | 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, Boolean)
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. |
| Boolean | 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, Boolean)
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. |
| Boolean | 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.
|