From 9dff7f7d568f4fb56ec5b68b3f26dc61732e03a8 Mon Sep 17 00:00:00 2001 From: milimoe Date: Sat, 3 Jan 2026 21:30:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E5=85=A5=20SQLHelper=EF=BC=8C?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E5=8F=AF=E4=BB=A5=E7=9B=B4=E6=8E=A5=E4=BD=BF?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FunGame.WebAPI/Program.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/FunGame.WebAPI/Program.cs b/FunGame.WebAPI/Program.cs index 40c84cd..7629124 100644 --- a/FunGame.WebAPI/Program.cs +++ b/FunGame.WebAPI/Program.cs @@ -12,6 +12,7 @@ using Microsoft.AspNetCore.Mvc.ApplicationParts; using Microsoft.Extensions.Logging.Console; using Microsoft.IdentityModel.Tokens; using Milimoe.FunGame; +using Milimoe.FunGame.Core.Api.Transmittal; using Milimoe.FunGame.Core.Api.Utility; using Milimoe.FunGame.Core.Library.Common.Addon; using Milimoe.FunGame.Core.Library.Common.Network; @@ -180,6 +181,13 @@ try throw new NoUserLogonException(); }); + builder.Services.AddTransient(provider => + { + SQLHelper? sql = Factory.OpenFactory.GetSQLHelper(); + if (sql != null) return sql; + throw new SQLServiceException(); + }); + builder.Services.AddTransient(); WebApplication app = builder.Build();