CosmosDbContextOptionsBuilder.SessionTokenManagementMode Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
The SessionTokenManagementMode to use.
Returns
Remarks
See Using DbContextOptions, and Accessing Azure Cosmos DB with EF Core for more information and examples.