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