mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-25 19:38:37 +08:00
* Uses MySQL Connector/NET from nuget * Adds SQL Server type to configuration. * Hostname for MySQL connections can include port - Format: <hostname>[:<port>] * Abstracted a bundle of stuff to be generic for both MSSQL and MySQL, including a number of variable and method names. (Mostly went from "sql..." -> "db..." * Changed MiscTools.DBDate() string building for MSSQL, uses DateTime.ToString() with a format which seemed simpler. * Unsure about which lines in .csproj are actually required, and which are auto-munged by Visual Studio. * ... This is my first C# (and VS!) work, be gentle! Signed-off-by: Mike Beattie <mike@ethernal.org>
17 lines
451 B
C#
17 lines
451 B
C#
using System;
|
|
using System.Data.Common;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace mRemoteNG.Config.DatabaseConnectors
|
|
{
|
|
public interface IDatabaseConnector : IDisposable
|
|
{
|
|
DbConnection DbConnection();
|
|
DbCommand DbCommand(string dbCommand);
|
|
bool IsConnected { get; }
|
|
void Connect();
|
|
Task ConnectAsync();
|
|
void Disconnect();
|
|
void AssociateItemToThisConnector(DbCommand dbCommand);
|
|
}
|
|
} |