Example #1
0
        private Connection GetConnection(SqlServerServiceInfo info, IConfiguration configuration)
        {
            var sqlConfig  = new SqlServerProviderConnectorOptions(configuration);
            var configurer = new SqlServerProviderConfigurer();

            return(new Connection(configurer.Configure(info, sqlConfig), "SqlServer", info));
        }
Example #2
0
        public Connection Get(IConfiguration configuration, string serviceName)
        {
            var info = serviceName == null
            ? configuration.GetSingletonServiceInfo <SqlServerServiceInfo>()
            : configuration.GetRequiredServiceInfo <SqlServerServiceInfo>(serviceName);

            var sqlConfig  = new SqlServerProviderConnectorOptions(configuration);
            var configurer = new SqlServerProviderConfigurer();

            return(new Connection
            {
                ConnectionString = configurer.Configure(info, sqlConfig),
                Name = "SqlServer" + serviceName?.Insert(0, "-")
            });
        }
Example #3
0
 public virtual string CreateConnectionString()
 {
     return(_configurer.Configure(_info, _config));
 }