Udostępnij za pośrednictwem


ConflictResolutionDefinition.WithCustomStoredProcedureResolution Method

Definition

Defines the stored procedure to be used as custom conflict resolution mode ConflictResolutionPolicy.

public Azure.Cosmos.Fluent.ConflictResolutionDefinition WithCustomStoredProcedureResolution (string conflictResolutionProcedure);
member this.WithCustomStoredProcedureResolution : string -> Azure.Cosmos.Fluent.ConflictResolutionDefinition
Public Function WithCustomStoredProcedureResolution (conflictResolutionProcedure As String) As ConflictResolutionDefinition

Parameters

conflictResolutionProcedure
String

Sets the stored procedure's name to be used for conflict-resolution.

Returns

An instance of the current UniqueKeyDefinition.

Examples

This example below creates a CosmosContainer with a Conflict Resolution policy that uses a stored procedure to resolve conflicts:

await databaseForConflicts.DefineContainer("myContainer", "/id")
    .WithConflictResolution()
        .WithCustomStoredProcedureResolution("myStoredProcedure")
        .Attach()
    .CreateAsync();
</example>

Remarks

The stored procedure can be created later on, but needs to honor the name specified here.

Applies to