Share via


ConflictResolutionDefinition.WithCustomStoredProcedureResolution Method

Definition

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

public Microsoft.Azure.Cosmos.Fluent.ConflictResolutionDefinition WithCustomStoredProcedureResolution (string conflictResolutionProcedure);
member this.WithCustomStoredProcedureResolution : string -> Microsoft.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 ConflictResolutionDefinition.

Examples

This example below creates a Container 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