KestrunContext.Session property

Returns the ASP.NET Core session if the Session middleware is active; otherwise null.

public ISession? Session { get; }

See Also