diff --git a/Src/Asp.Net/SqlSugar/SqlSugarClient.cs b/Src/Asp.Net/SqlSugar/SqlSugarClient.cs index 177ac9be4..74761e7db 100644 --- a/Src/Asp.Net/SqlSugar/SqlSugarClient.cs +++ b/Src/Asp.Net/SqlSugar/SqlSugarClient.cs @@ -637,7 +637,8 @@ namespace SqlSugar public SqlSugarProvider GetConnectionWithAttr() { var attr = typeof(T).GetCustomAttribute(); - Check.ExceptionEasy(attr==null,"not TenantAttribute", "不存在特性 TenantAttribute"); + if (attr == null) + return this.GetConnection(this.CurrentConnectionConfig.ConfigId); var configId = attr.configId; return this.GetConnection(configId); }