using System;
/*
You have a multitenant application with a dedicated database for each tenant. (Db1, Db2 ... DbN)
You want to create a DbConnectionFactory that will be responsible for establishing DbConnection
for each tenant, taking into account such features:
1. caching.
2. thread-safe.
3. retry
The DbConnection can be created in the following way: var dbConnection = new DbConnection(connectionString);
*/
interface IDbConnectionFactory
{
IDbConnection GetConnection(string connectionString);
}
//Answer