public IDictionary<string, IDapperSession> OpenAndBind() { IDictionary<string, IDapperSession> result = new Dictionary<string, IDapperSession>(); var conStrings = GetAllLoadedContexts(); foreach (var conString in conStrings) { IConnectionStringProvider provider = GetCsProvider(conString); var connection = _configuration.Dialect.GetConnection(provider.ConnectionString(conString)); connection.Open(); var session = new DapperSession(connection); result.Add(conString, session); } return result; }
public IDictionary <string, IDapperSession> OpenAndBind() { IDictionary <string, IDapperSession> result = new Dictionary <string, IDapperSession>(); var conStrings = GetAllLoadedContexts(); foreach (var conString in conStrings) { IConnectionStringProvider provider = GetCsProvider(conString); var connection = _configuration.Dialect.GetConnection(provider.ConnectionString(conString)); connection.Open(); var session = new DapperSession(connection); result.Add(conString, session); } return(result); }