mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-03-05 01:00:51 +08:00
sql日志打印输出配置
This commit is contained in:
@@ -7,14 +7,14 @@ namespace Yi.Framework.WebCore
|
||||
{
|
||||
public static class ServiceLocator
|
||||
{
|
||||
public static IServiceProvider Instance { get; set; }
|
||||
public static IServiceProvider? Instance { get; set; }
|
||||
|
||||
public static string Admin { get; set; } = "cc";
|
||||
|
||||
public static bool GetHttp(out HttpContext httpContext)
|
||||
public static bool GetHttp(out HttpContext? httpContext)
|
||||
{
|
||||
httpContext = null;
|
||||
var httpContextAccessor = Instance.GetService<IHttpContextAccessor>();
|
||||
var httpContextAccessor = Instance?.GetService<IHttpContextAccessor>();
|
||||
if (httpContextAccessor is null)
|
||||
{
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user