public CoreAngularDemoDbContext CreateDbContext(string[] args)
        {
            var builder       = new DbContextOptionsBuilder <CoreAngularDemoDbContext>();
            var configuration = AppConfigurations.Get(WebContentDirectoryFinder.CalculateContentRootFolder(), addUserSecrets: true);

            CoreAngularDemoDbContextConfigurer.Configure(builder, configuration.GetConnectionString(CoreAngularDemoConsts.ConnectionStringName));

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

            // Uncomment below line to write change logs for the entities below:
            //Configuration.EntityHistory.Selectors.Add("CoreAngularDemoEntities", EntityHistoryHelper.TrackedTypes);
            //Configuration.CustomConfigProviders.Add(new EntityHistoryConfigProvider(Configuration));
        }