public FirstProjectDbContext CreateDbContext(string[] args)
        {
            var builder       = new DbContextOptionsBuilder <FirstProjectDbContext>();
            var configuration = AppConfigurations.Get(WebContentDirectoryFinder.CalculateContentRootFolder());

            FirstProjectDbContextConfigurer.Configure(builder, configuration.GetConnectionString(FirstProjectConsts.ConnectionStringName));

            return(new FirstProjectDbContext(builder.Options));
        }
 public override void PreInitialize()
 {
     if (!SkipDbContextRegistration)
     {
         Configuration.Modules.AbpEfCore().AddDbContext <FirstProjectDbContext>(options =>
         {
             if (options.ExistingConnection != null)
             {
                 FirstProjectDbContextConfigurer.Configure(options.DbContextOptions, options.ExistingConnection);
             }
             else
             {
                 FirstProjectDbContextConfigurer.Configure(options.DbContextOptions, options.ConnectionString);
             }
         });
     }
 }