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