Esempio n. 1
0
        public ConnectionProvider(IServiceProvider serviceProvider, string provider, string connectionString)
        {
            _connectionString = connectionString;
            _provider         = provider;
            _factory          = FactoryProvider.FindFactory(serviceProvider, _provider);

            if (_factory == null)
            {
                throw new Exception("DBSH-00001 Unknown connection provider:" + provider);
            }
        }
 public static IDatabaseFactory GetFactory(this DbConnection connection, IServiceProvider serviceProvider)
 {
     return(FactoryProvider.FindFactory(serviceProvider, connection));
 }