使用 AddScoped

This commit is contained in:
milimoe 2026-01-03 21:32:10 +08:00
parent 9dff7f7d56
commit 39280c3dc5
Signed by: milimoe
GPG Key ID: 9554D37E4B8991D0

View File

@ -181,7 +181,7 @@ try
throw new NoUserLogonException();
});
builder.Services.AddTransient(provider =>
builder.Services.AddScoped(provider =>
{
SQLHelper? sql = Factory.OpenFactory.GetSQLHelper();
if (sql != null) return sql;