改造null

This commit is contained in:
陈淳
2022-10-17 18:08:16 +08:00
parent 16d25fb60d
commit 9d365dbf1e
20 changed files with 117 additions and 42 deletions

View File

@@ -11,7 +11,7 @@ namespace Yi.Framework.WebCore.MiddlewareExtend
{
public static class SqlsugarExtension
{
public static void AddSqlsugarServer(this IServiceCollection services, Action<SqlSugarClient> action = null)
public static void AddSqlsugarServer(this IServiceCollection services, Action<SqlSugarClient>? action = null)
{
DbType dbType;
var slavaConFig = new List<SlaveConnectionConfig>();
@@ -60,7 +60,7 @@ namespace Yi.Framework.WebCore.MiddlewareExtend
},
db =>
{
if (action.IsNotNull())
if (action is not null)
{
action(db);
}