public DataContext(string connectionName) { Check.IsEmpty(connectionName); var connectionString = ConfigurationManager.ConnectionStrings[connectionName]; _provider = ProviderHelper.GetProvider(connectionString.ProviderName); _connection = _provider.CreateConnection(connectionString.ConnectionString); }