sql日志打印输出配置

This commit is contained in:
陈淳
2022-10-18 09:01:16 +08:00
parent 9d365dbf1e
commit dab4a092d9
20 changed files with 100 additions and 66 deletions

View File

@@ -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;