mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
22 lines
535 B
C#
22 lines
535 B
C#
using MySql.Data.MySqlClient;
|
|
|
|
namespace Cicm.Database
|
|
{
|
|
public class Mysql
|
|
{
|
|
MySqlConnection connection;
|
|
|
|
public Mysql(string server, string user, string database, ushort port, string password)
|
|
{
|
|
string connectionString =
|
|
$"server={server};user={user};database={database};port={port};password={password}";
|
|
|
|
connection = new MySqlConnection(connectionString);
|
|
}
|
|
|
|
~Mysql()
|
|
{
|
|
connection?.Close();
|
|
}
|
|
}
|
|
} |