diff --git a/aspnetcore/migration/inc/samples/wrapped/Program.cs b/aspnetcore/migration/inc/samples/wrapped/Program.cs index 819c9deadcf7..3dad9c236f45 100644 --- a/aspnetcore/migration/inc/samples/wrapped/Program.cs +++ b/aspnetcore/migration/inc/samples/wrapped/Program.cs @@ -8,7 +8,7 @@ options.RegisterKey("test-value"); options.RegisterKey("SampleSessionItem"); }) - .WrapAspNetCoreSession(); + .AddWrappedAspNetCoreSession(); // var app = builder.Build(); diff --git a/aspnetcore/migration/inc/wrapped.md b/aspnetcore/migration/inc/wrapped.md index 2daf677855d1..491f7545dea9 100644 --- a/aspnetcore/migration/inc/wrapped.md +++ b/aspnetcore/migration/inc/wrapped.md @@ -4,17 +4,19 @@ description: Wrapped ASP.NET Core session state author: rick-anderson ms.author: riande monikerRange: '>= aspnetcore-6.0' -ms.date: 11/9/2022 +ms.date: 2/24/2025 ms.topic: article uid: migration/inc/wrapped --- # Wrapped ASP.NET Core session state -This implementation wraps the session provided on ASP.NET Core so that it can be used with the adapters. The session will be using the same backing store as `Microsoft.AspNetCore.Http.ISession` but will provide strongly-typed access to its members. +The [AddWrappedAspNetCoreSession](https://github.com/dotnet/systemweb-adapters/blob/main/src/Microsoft.AspNetCore.SystemWebAdapters.CoreServices/SessionState/Wrapped/WrappedSessionExtensions.cs) implementation wraps the session provided on ASP.NET Core so that it can be used with the adapters. The session uses the same backing store as [`Microsoft.AspNetCore.Http.ISession`](/dotnet/api/microsoft.aspnetcore.http.isession) but provides strongly-typed access to its members. -Configuration for ASP.NET Core would look similar to the following: +Configuration for ASP.NET Core looks similar to the following: :::code language="csharp" source="~/migration/inc/samples/wrapped/Program.cs" id="snippet_WrapAspNetCoreSession" ::: -The framework app would not need any changes to enable this behavior. +The framework app doesn't need any changes to enable this behavior. + +For more information, see the [AddWrappedAspNetCoreSession sample app](https://github.com/dotnet/systemweb-adapters/blob/main/samples/CoreApp/Program.cs)