数据库管理组件增加查看数据库是否能连接的属性

This commit is contained in:
FalconFly 2024-01-09 11:08:58 +08:00
parent 821afa2aa8
commit 449548e515
2 changed files with 5 additions and 0 deletions

View File

@ -23,5 +23,9 @@ namespace Falcon.SugarApi.DatabaseManager
this.Logger = service.GetService(typeof(ILogger<>).MakeGenericType(GetType())) as ILogger ?? throw new NullReferenceException("ILogger");
}
/// <summary>
/// 是否能连接到数据库
/// </summary>
public bool CanConnection => this.Ado.IsValidConnection();
}
}

View File

@ -0,0 +1 @@
## 数据库管理组件