public XiongHuiDbContext Create(DbContextFactoryOptions options) { var builder = new DbContextOptionsBuilder <XiongHuiDbContext>(); var configuration = AppConfigurations.Get(WebContentDirectoryFinder.CalculateContentRootFolder()); XiongHuiDbContextConfigurer.Configure(builder, configuration.GetConnectionString(XiongHuiConsts.ConnectionStringName)); return(new XiongHuiDbContext(builder.Options)); }
public override void PreInitialize() { if (!SkipDbContextRegistration) { Configuration.Modules.AbpEfCore().AddDbContext <XiongHuiDbContext>(configuration => { XiongHuiDbContextConfigurer.Configure(configuration.DbContextOptions, configuration.ConnectionString); }); } }