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