Fixed sample and instructions
This commit is contained in:
parent
64fa05dbaf
commit
0d78bdbef2
|
|
@ -20,21 +20,21 @@ namespace SessionSample
|
||||||
|
|
||||||
public void ConfigureServices(IServiceCollection services)
|
public void ConfigureServices(IServiceCollection services)
|
||||||
{
|
{
|
||||||
// Adds a default in-memory implementation of IDistributedCache
|
// Uncomment the following line to use the Microsoft SQL Server implementation of IDistributedCache.
|
||||||
services.AddCaching();
|
// Note that this would require setting up the session state database.
|
||||||
|
//services.AddSqlServerCache(o =>
|
||||||
|
//{
|
||||||
|
// o.ConnectionString = "Server=.;Database=ASPNET5SessionState;Trusted_Connection=True;";
|
||||||
|
// o.SchemaName = "dbo";
|
||||||
|
// o.TableName = "Sessions";
|
||||||
|
//});
|
||||||
|
|
||||||
// Uncomment the following line to use the Redis implementation of IDistributedCache.
|
// Uncomment the following line to use the Redis implementation of IDistributedCache.
|
||||||
// This will override any previously registered IDistributedCache service.
|
// This will override any previously registered IDistributedCache service.
|
||||||
//services.AddTransient<IDistributedCache, RedisCache>();
|
//services.AddTransient<IDistributedCache, RedisCache>();
|
||||||
|
|
||||||
// Uncomment the following line to use the Microsoft SQL Server implementation of IDistributedCache.
|
// Adds a default in-memory implementation of IDistributedCache
|
||||||
// Note that this would require setting up the session state database.
|
services.AddCaching();
|
||||||
// This will override any previously registered IDistributedCache service.
|
|
||||||
//services.AddSqlServerCache(o =>
|
|
||||||
//{
|
|
||||||
// o.ConnectionString = "Server=.;Database=ASPNET5SessionState;Trusted_Connection=True;";
|
|
||||||
// o.TableName = "Sessions";
|
|
||||||
//});
|
|
||||||
|
|
||||||
services.AddSession();
|
services.AddSession();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue