mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-10-18 04:47:04 +02:00
Merge upstream to 1.6.9a
This commit is contained in:
commit
a84ebee1db
17 changed files with 188 additions and 45 deletions
|
|
@ -41,16 +41,18 @@ public class Database(string dbConnectionString)
|
|||
migrator.ExecuteMigrations();
|
||||
}
|
||||
|
||||
public bool CheckDatabaseConnection()
|
||||
public bool CheckDatabaseConnection(out string? exception)
|
||||
{
|
||||
using var connection = GetConnection();
|
||||
|
||||
exception = null;
|
||||
|
||||
try
|
||||
{
|
||||
return connection.Ping();
|
||||
}
|
||||
catch
|
||||
catch (Exception ex)
|
||||
{
|
||||
exception = ex.Message;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue