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;
        }
コード例 #2
0
        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);
        }