Update Custom db

This commit is contained in:
sunkaixuna
2022-02-01 16:17:03 +08:00
parent c9c5ceace9
commit 275468dc40
2 changed files with 3 additions and 1 deletions

View File

@@ -388,7 +388,8 @@ namespace SqlSugar
InstanceFactory.CustomTypeName = SugarCompatible.IsFramework?"SqlSugar.Access": "SqlSugar.AccessCore";
break;
case DbType.Custom:
InstanceFactory.CustomTypeName = "Custom";
Check.Exception(config?.MoreSettings?.CustomNugetDllName == null,ErrorMessage.GetThrowMessage("if DbType is Custmon , ConnectionConfig.MoreSettings.CustomNugetDbName is not null", "DbType是Custom 而需要设置外部数据库支持dll名称。示例 ConnectionConfig.MoreSettings.CustomNugetDllName=\"SqlSugar.DB2\" , 设置完后我们需要引用SqlSugar.DB2.dll "));
InstanceFactory.CustomTypeName = config.MoreSettings.CustomNugetDllName;
break;
default:
throw new Exception("ConnectionConfig.DbType is null");

View File

@@ -14,5 +14,6 @@ namespace SqlSugar
public bool PgSqlIsAutoToLower = true;
public int DefaultCacheDurationInSeconds { get; set; }
public bool? TableEnumIsString { get; set; }
public string CustomNugetDllName { get; set; }
}
}