public static LinqToDbConnectionOptionsBuilder UseConnectionStringSettings <TConnection, TDataReader>(this LinqToDbConnectionOptionsBuilder options, ConnectionStringSettings connectionStringSettings)
            where TConnection : DbConnection, new()
            where TDataReader : IDataReader
        {
            //logger.Information($"{nameof(UseConnectionStringSettings)}<{typeof(TConnection)},{typeof(TDataReader)};Name:{connectionStringSettings.Name};Provider:{connectionStringSettings.ProviderName};CS:{connectionStringSettings.ConnectionString}");
            IDataProvider dataProvider = GenericDataProviderList.GetInstance <TConnection, TDataReader>(connectionStringSettings.ConnectionString);

            return(options.UseConnectionStringSettings(dataProvider, connectionStringSettings));
        }
Beispiel #2
0
 public GenericDataConnection(string connectionString) : base(GenericDataProviderList.GetInstance <TConnection, TDataReader>(connectionString), connectionString)
 {
 }