Skip to content

Commit

Permalink
fix: change IConfigurationRoot to IConfiguration to be less restrictive
Browse files Browse the repository at this point in the history
  • Loading branch information
ridingwolf authored and CumpsD committed Mar 7, 2019
1 parent 9efc1d9 commit 76e4a27
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ public TContext CreateDbContext(string[] args)
return CreateContext(contextOptions);
}

public IRunnerDbContextMigrator CreateMigrator(IConfigurationRoot configuration, ILoggerFactory loggerFactory)
public IRunnerDbContextMigrator CreateMigrator(IConfiguration configuration, ILoggerFactory loggerFactory)
{
var contextOptions = CreateOptionsBuilder(configuration, loggerFactory).Options;

return new RunnerDbContextMigrator<TContext>(() => CreateContext(contextOptions), loggerFactory);
}

private DbContextOptionsBuilder<TContext> CreateOptionsBuilder(IConfigurationRoot configuration)
private DbContextOptionsBuilder<TContext> CreateOptionsBuilder(IConfiguration configuration)
{
var connectionString = configuration?.GetConnectionString(_connectionStringName);
if (string.IsNullOrWhiteSpace(connectionString))
Expand All @@ -70,7 +70,7 @@ private DbContextOptionsBuilder<TContext> CreateOptionsBuilder(IConfigurationRoo
);
}

private DbContextOptionsBuilder<TContext> CreateOptionsBuilder(IConfigurationRoot configuration, ILoggerFactory loggerFactory)
private DbContextOptionsBuilder<TContext> CreateOptionsBuilder(IConfiguration configuration, ILoggerFactory loggerFactory)
{
if (null == loggerFactory)
throw new ArgumentNullException(nameof(loggerFactory));
Expand Down

0 comments on commit 76e4a27

Please sign in to comment.