ISession Extension methods
net 6 newbie
121
Reputation points
For creating/adding sessions I am using
- app.UseSession(); // middleware
- registering services as
builder.Services.AddSession(options =>
{
options.Cookie.Name = "Session";
options.IdleTimeout = TimeSpan.FromSeconds(500);
options.Cookie.HttpOnly = true;
options.Cookie.IsEssential = true;
options.Cookie.SameSite = SameSiteMode.Lax;
});
It is working fine. But my question is
the extension methods SetString(),GetString() on ISession interface are not found in the app.UseSession() middleware.
Then how this extension methods are working.
I have searched the src files in the following link but could not find where the extension methods are declared.
https://github.com/dotnet/aspnetcore/tree/main/src/Middleware/Session