mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-12-29 01:44:41 +08:00
Add db.Ado.IsValidConnectionNoClose
This commit is contained in:
@@ -87,6 +87,18 @@ namespace SqlSugar
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public virtual bool IsValidConnectionNoClose()
|
||||
{
|
||||
try
|
||||
{
|
||||
this.Open();
|
||||
return true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public virtual void Open()
|
||||
{
|
||||
CheckConnection();
|
||||
|
||||
@@ -165,6 +165,7 @@ namespace SqlSugar
|
||||
void Open();
|
||||
SugarConnection OpenAlways();
|
||||
bool IsValidConnection();
|
||||
bool IsValidConnectionNoClose();
|
||||
void CheckConnection();
|
||||
|
||||
void BeginTran();
|
||||
|
||||
Reference in New Issue
Block a user