⚠️feat: SqlSugar自动识别所有连接字符串

This commit is contained in:
yubaolee
2025-06-28 17:14:35 +08:00
parent b38391fddd
commit b61b315d27
7 changed files with 151 additions and 59 deletions

View File

@@ -16,7 +16,7 @@ namespace Infrastructure.Extensions.AutofacManager
public static TService GetService<TService>() where TService:class
{
Type typeParameterType = typeof(TService);
return (TService)_provider.GetService(typeParameterType);
return (TService)_provider?.GetService(typeParameterType);
}
}
}