SessionTokenManagementMode Enum
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.
Defines the behavior of EF Core regarding the management of Cosmos DB session tokens.
public enum SessionTokenManagementMode
type SessionTokenManagementMode =
Public Enum SessionTokenManagementMode
- Inheritance
-
SessionTokenManagementMode
Fields
| Name | Value | Description |
|---|---|---|
| FullyAutomatic | 0 | The default mode. Uses the underlying Cosmos DB SDK automatic session token management. EF will not track or parse session tokens returned from Cosmos DB. UseSessionTokens(DatabaseFacade, IReadOnlyDictionary<String,String>) and GetSessionTokens(DatabaseFacade) methods will throw when invoked. |
| SemiAutomatic | 1 | Allows the usage of UseSessionTokens(DatabaseFacade, IReadOnlyDictionary<String,String>) to overwrite the default Cosmos DB SDK automatic session token management. If 'UseSessionTokens' has not been invoked for a container, the default Cosmos DB SDK automatic session token management will be used. EF will track and parse session tokens returned from Cosmos DB, which can be retrieved via GetSessionTokens(DatabaseFacade). |
| Manual | 2 | Fully overwrites the Cosmos DB SDK automatic session token management, and only uses session tokens specified via UseSessionTokens(DatabaseFacade, IReadOnlyDictionary<String,String>). If 'UseSessionTokens' has not been invoked for a container, no session token will be used. EF will track and parse session tokens returned from Cosmos DB, which can be retrieved via GetSessionTokens(DatabaseFacade). |
| EnforcedManual | 3 | Same as Manual, but will throw an exception if UseSessionTokens(DatabaseFacade, IReadOnlyDictionary<String,String>) was not invoked before executing a read. |
Remarks
See Cosmos session consistency for more info.