public Connection Get(IConfiguration configuration, string serviceName) { var info = serviceName == null ? configuration.GetSingletonServiceInfo <PostgresServiceInfo>() : configuration.GetRequiredServiceInfo <PostgresServiceInfo>(serviceName); var postgresConfig = new PostgresProviderConnectorOptions(configuration); var configurer = new PostgresProviderConfigurer(); return(new Connection { ConnectionString = configurer.Configure(info, postgresConfig), Name = "Postgres" + serviceName?.Insert(0, "-") }); }