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

            InventoryManagementSystemDbContextConfigurer.Configure(builder, configuration.GetConnectionString(InventoryManagementSystemConsts.ConnectionStringName));

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