/// <summary> /// Gets the connection string for this <see cref="DatabaseContainer"/>. /// </summary> /// <param name="parameters">Database to create connection string for</param> /// <returns>Connection string to database</returns> public abstract string CreateConnectionString(ConnectionStringParameters parameters);
/// <summary> /// Creates a connection to the database container using the specified <paramref name="connectionStringParameters"/>. /// </summary> /// <typeparam name="T">Type of <see cref="IDbConnection"/> to create</typeparam> /// <param name="container">Container to build connection to</param> /// <param name="connectionStringParameters">Connection string parameters to use</param> /// <returns>Connection to the container</returns> public static Task <T> CreateConnectionAsync <T>(this DatabaseContainer container, ConnectionStringParameters connectionStringParameters) where T : IDbConnection { return(CreateConnectionAsync <T>(container, container.CreateConnectionString(connectionStringParameters))); }