Språk

CosmosDbContextOptionsBuilder.SessionTokenManagementMode Method

Definition

Sets the SessionTokenManagementMode to use. By default, FullyAutomatic will be used. Any other mode is only relevant when your application needs to manage session tokens manually. For example: If you're using a round-robin load balancer that doesn't maintain session affinity between requests. Manual session token management can break session consistency when not handled properly. See Utilize session tokens for more details.

public virtual Microsoft.EntityFrameworkCore.Infrastructure.CosmosDbContextOptionsBuilder SessionTokenManagementMode(Microsoft.EntityFrameworkCore.Cosmos.Infrastructure.SessionTokenManagementMode mode);
abstract member SessionTokenManagementMode : Microsoft.EntityFrameworkCore.Cosmos.Infrastructure.SessionTokenManagementMode -> Microsoft.EntityFrameworkCore.Infrastructure.CosmosDbContextOptionsBuilder
override this.SessionTokenManagementMode : Microsoft.EntityFrameworkCore.Cosmos.Infrastructure.SessionTokenManagementMode -> Microsoft.EntityFrameworkCore.Infrastructure.CosmosDbContextOptionsBuilder
Public Overridable Function SessionTokenManagementMode (mode As SessionTokenManagementMode) As CosmosDbContextOptionsBuilder

Parameters

Returns

Remarks

See Using DbContextOptions, and Accessing Azure Cosmos DB with EF Core for more information and examples.

Applies to