/// <summary> /// Get Connection string to Database server /// </summary> /// <param name="Server">Setting of the server </param> /// <param name="DataBase">Name of database you want to connect with it</param> /// <returns>The connection string to the database</returns> public static string GetConnectionString(DatabaseServer Server, string DataBase) { return(GetConnectionString(Server.ServerName, DataBase, Server.Username, Server.Password, Server.Port)); }
/// <summary> /// Test Connection to Database server using SQL Authintication /// </summary> /// <param name="Server">Server Setting </param> /// <returns>Return true if connection test Successful</returns> public static bool DBConnectionTest(DatabaseServer Server) { string connString = GetConnectionString(Server.ServerName, "Master", Server.Username, Server.Password, Server.Port); return(DBConnectionTest(connString)); }