public ABPsinglePageProj1DbContext CreateDbContext(string[] args) { var builder = new DbContextOptionsBuilder <ABPsinglePageProj1DbContext>(); var configuration = AppConfigurations.Get(WebContentDirectoryFinder.CalculateContentRootFolder()); ABPsinglePageProj1DbContextConfigurer.Configure(builder, configuration.GetConnectionString(ABPsinglePageProj1Consts.ConnectionStringName)); return(new ABPsinglePageProj1DbContext(builder.Options)); }
public override void PreInitialize() { if (!SkipDbContextRegistration) { Configuration.Modules.AbpEfCore().AddDbContext <ABPsinglePageProj1DbContext>(options => { if (options.ExistingConnection != null) { ABPsinglePageProj1DbContextConfigurer.Configure(options.DbContextOptions, options.ExistingConnection); } else { ABPsinglePageProj1DbContextConfigurer.Configure(options.DbContextOptions, options.ConnectionString); } }); } }