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