The dotnet-sql-cache package provides the .NET CLI command that creates the database table required by the SQL Server distributed cache provider. In the board-game API, it creates the dedicated AppCache table in the existing MyBGList database. section 8.4.2
Create the cache table from the project root:
- Install the package with a version matching the installed .NET version, including its patch number. section 8.4.2
- Run the create command with the DefaultConnection value, the dbo schema, and the AppCache table name. section 8.4.2
- Use the complete connection string, including credentials, and replace doubled backslashes in SQL Server paths with single backslashes. section 8.4.2
- Verify that the command creates AppCache, or create the table manually with SQL Server Management Studio instead. section 8.4.2
dotnet tool install --global dotnet-sql-cache -version 6.0.11
Install the CLI tool with the required version. section 8.4.2
dotnet sql-cache create "{connectionString}" dbo AppCache
Create the dbo.AppCache table by supplying the connection string and database identifiers. section 8.4.2
Generated cache table
A successful command creates dbo.AppCache with required Id, Value, ExpiresAtTime, SlidingExpirationInSeconds, and AbsoluteExpiration columns for distributed cache entries. section 8.4.2

