You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
using System;
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
namespace EntrustSettle.Common.Extensions;
|
|
|
|
public static class HttpContextExtension
|
|
{
|
|
public static ISession GetSession(this HttpContext context)
|
|
{
|
|
try
|
|
{
|
|
return context.Session;
|
|
}
|
|
catch (Exception)
|
|
{
|
|
return default;
|
|
}
|
|
}
|
|
} |