public static IConfigurationRoot GetAppConfiguration(this IWebHostEnvironment env) { if (env == null) { return(null); } return(ISASConfiguration.Get(env.ContentRootPath, env.EnvironmentName, env.IsDevelopment())); }
public MigrateExecuter( IUnitOfWorkManager unitOfWorkManager, IDbContextResolver dbContextResolver, Log log) { _unitOfWorkManager = unitOfWorkManager; _dbContextResolver = dbContextResolver; _log = log; _appConfiguration = ISASConfiguration.Get(typeof(ISASMigratorModule).GetAssembly().GetDirectoryPathOrNull()); }
public ISASDbContext CreateDbContext(string[] args) { var builder = new DbContextOptionsBuilder <ISASDbContext>(); var configuration = ISASConfiguration.Get(WebContentDirectoryFinder.CalculateContentRootFolder()); DbContextOptionsConfigurer.Configure( builder, configuration.GetConnectionString(ISASConsts.ConnectionStringKey) ); return(new ISASDbContext(builder.Options)); }
public ISASMigratorModule(ISASEntityFrameworkCoreModule isasEntityFrameworkModule) { isasEntityFrameworkModule.SkipDbSeed = true; _appConfiguration = ISASConfiguration.Get(typeof(ISASMigratorModule).GetAssembly().GetDirectoryPathOrNull()); }