Skip to content

Commit 944f5ac

Browse files
Doc update. (#76)
1 parent 6c733d6 commit 944f5ac

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

Readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ The specific settings available for the new session state module and providers a
4444
* :warning: ***Action Required*** Sql provider `RepositoryType` - This new setting provides a little more flexibility for repository configuration beyond a single boolean for in-memory optimized tables. Possible values are `SqlServer|InMemory|InMemoryDurable|FrameworkCompat`. Read about what each configuration is at our [SqlSessionStateProviderAsync](docs/SqlSessionStateProviderAsync.md) doc page.
4545

4646
> The mechanics of nuget package upgrade results in removing old elements and re-adding the boiler-plate elements in configuration. To restore In-Memory functionality, set 'RepositoryType' to `InMemory`. To continue using an existing non-memory-optimized table without stored procedures, set 'RespositoryType' to `FrameworkCompat`. The recommendation is to update to the new table schema and use stored procedures with `SqlServer`, but this will ignore existing sessions in previously existing tables.
47+
* Moved to use `Microsoft.Data.SqlClient` instead of old `System.Data.SqlClient`. This allows for more modern features such as Token Authorization.
4748
* The Sql provider's `UseInMemoryTable` is deprecated. It will continue to be respected in the absence of `RepositoryType`, but is overridden by that setting if given.
4849
* Sql provider `SessionTableName` - A new setting that allows users to target a specific table in their database rather than being forced to use the default table names.
4950
* CosmosDB `collectionId` is now `containerId` in keeping with the updated terminology from the CosmosDB offering. Please use the updated parameter name when configuring your provider. (The old name will continue to work just the same.)
51+
* CosmosDB `partitionKeyPath` and `partitionNumUsedByProvider` are now ignored. Logical partitions are free and encouraged to be as numerous as possible in CosmosDB. As such, we have eliminated the old way of limiting and (unevenly) distributing sessions to partitions and now simply use the full SessionID as the partition key.
5052
* CosmosDB `connectionProtocol` is obsolete. It will not cause errors to have it in configuration, but it is ignored. The current [CosmosDB SDK chooses the protocol based on connection mode](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/sdk-connection-modes).

test/Microsoft.AspNet.SessionState.CosmosDBSessionStateProviderAsync.Test/CosmosDBSessionStateProviderAsyncTest.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,8 +1132,6 @@ private void SetupDatabaseMock(Mock<Database> databaseMoq, string id = Container
11321132
PartitionKeyPath = partitionKeyPath,
11331133
DefaultTimeToLive = DefaultSessionTimeoutInSec
11341134
};
1135-
// smolloy TODO DEBUG
1136-
//containerResponseMoq.SetupGet(cr => cr.Resource).Returns(existingContainerProperties);
11371135

11381136
databaseMoq.Setup(database => database.CreateContainerIfNotExistsAsync(
11391137
It.IsAny<ContainerProperties>(), It.IsAny<int>(),
@@ -1145,18 +1143,6 @@ private void SetupDatabaseMock(Mock<Database> databaseMoq, string id = Container
11451143
containerResponseMoq.SetupGet(cr => cr.Resource).Returns(props);
11461144
return (ContainerResponse)containerResponseMoq.Object;
11471145
});
1148-
// Task.FromResult((ContainerResponse)containerResponseMoq.Object));
1149-
1150-
// smolloy TODO DEBUG
1151-
//databaseMoq.Setup(database => database.CreateContainerIfNotExistsAsync(
1152-
// It.Is<ContainerProperties>(properties => properties.Id == id),
1153-
// It.IsAny<int>(), It.IsAny<RequestOptions>(), It.IsAny<CancellationToken>()))
1154-
// .Returns(Task.FromResult((ContainerResponse)containerResponseMoq.Object));
1155-
1156-
//databaseMoq.Setup(database => database.CreateContainerIfNotExistsAsync(
1157-
// It.Is<ContainerProperties>(properties => properties.Id != id),
1158-
// It.IsAny<int>(), It.IsAny<RequestOptions>(), It.IsAny<CancellationToken>()))
1159-
// .Returns(Task.FromResult((ContainerResponse)null));
11601146
}
11611147

11621148
private StoredProcedureExecuteResponse<T> CreateStoredProcedureResponseInstance<T>(HttpStatusCode statusCode, T responseBody)

0 commit comments

Comments
 (0)