Exemple #1
0
        public ReportFaultDbContext Create(DbContextFactoryOptions options)
        {
            var builder       = new DbContextOptionsBuilder <ReportFaultDbContext>();
            var configuration = AppConfigurations.Get(WebContentDirectoryFinder.CalculateContentRootFolder());

            ReportFaultDbContextConfigurer.Configure(builder, configuration.GetConnectionString(ReportFaultConsts.ConnectionStringName));

            return(new ReportFaultDbContext(builder.Options));
        }
Exemple #2
0
 public override void PreInitialize()
 {
     if (!SkipDbContextRegistration)
     {
         Configuration.Modules.AbpEfCore().AddDbContext <ReportFaultDbContext>(configuration =>
         {
             ReportFaultDbContextConfigurer.Configure(configuration.DbContextOptions, configuration.ConnectionString);
         });
     }
 }