Ejemplo n.º 1
0
 protected ProcessorBase(IMigrationGenerator generator,
                         ILogger logger,
                         ProcessorOptions options)
 {
     Generator = generator;
     Options   = options;
     Logger    = logger;
 }
Ejemplo n.º 2
0
 protected GenericProcessorBase(Func <DbProviderFactory> factoryAccessor,
                                IMigrationGenerator generator,
                                ILogger logger,
                                ProcessorOptions options)
     : base(generator, logger, options)
 {
     _dbProviderFactory = new Lazy <DbProviderFactory>(factoryAccessor.Invoke);
     _lazyConnection    = new Lazy <IDbConnection>(
         () => {
         var connection = DbProviderFactory.CreateConnection();
         Debug.Assert(connection != null, nameof(Connection) + " != null");
         connection.ConnectionString = options.ConnectionString;
         connection.Open();
         return(connection);
     });
 }