private static void EnsureDataStorageIsReady(IConfiguration config, IServiceProvider scopedServices)
        {
            var storage = config["DataOptions:DbType"];

            switch (storage)
            {
            case "ef":
                LoggingEFStartup.InitializeDatabaseAsync(scopedServices).Wait();
                CoreEFStartup.InitializeDatabaseAsync(scopedServices).Wait();
                SimpleContentEFStartup.InitializeDatabaseAsync(scopedServices).Wait();

                FormsDatabase.InitializeDatabaseAsync(scopedServices).Wait();

                break;

            case "nodb":
            default:

                CoreNoDbStartup.InitializeDataAsync(scopedServices).Wait();
                break;
            }
        }
 private static void EnsureDataStorageIsReady(IServiceProvider scopedServices)
 {
     #if (Logging)
     #if (!NoDb)
     var deleteLogsOlderThanDays = 90;
     LoggingEFStartup.InitializeDatabaseAsync(scopedServices, deleteLogsOlderThanDays).Wait();
     #endif
     #endif
     #if (NoDb)
     CoreNoDbStartup.InitializeDataAsync(scopedServices).Wait();
     #else
     CoreEFStartup.InitializeDatabaseAsync(scopedServices).Wait();
     #endif
     #if (SimpleContentConfig != "z")
     #if (!NoDb)
     SimpleContentEFStartup.InitializeDatabaseAsync(scopedServices).Wait();
     #endif
     #endif
     #if (KvpCustomRegistration || Newsletter)
     #if (!NoDb)
     KvpEFCoreStartup.InitializeDatabaseAsync(scopedServices).Wait();
     #endif
     #endif
     #if (IdentityServer)
     #if (NoDb)
     CloudscribeIdentityServerIntegrationNoDbStorage.InitializeDatabaseAsync(scopedServices).Wait();
     #else
     CloudscribeIdentityServerIntegrationEFCoreStorage.InitializeDatabaseAsync(scopedServices).Wait();
     #endif
     #endif
     #if (FormBuilder)
     #if (!NoDb)
     FormsDatabase.InitializeDatabaseAsync(scopedServices).Wait();
     #endif
     #endif
     #if (Paywall)
     #if (!NoDb)
     MembershipDatabase.InitializeDatabaseAsync(scopedServices).Wait();
     #endif
     #endif
      #if (IncludeEmailQueue)
     #if (!NoDb)
     EmailQueueDatabase.InitializeDatabaseAsync(scopedServices).Wait();
     EmailTemplateDatabase.InitializeDatabaseAsync(scopedServices).Wait();
     #endif
     #endif
     #if (Newsletter)
     #if (!NoDb)
     EmailListDatabase.InitializeDatabaseAsync(scopedServices).Wait();
     #endif
     #endif
     #if (IncludeStripeIntegration)
     #if (!NoDb)
     StripeDatabase.InitializeDatabaseAsync(scopedServices).Wait();
     #endif
     #endif
     #if (DynamicPolicy)
     #if (!NoDb)
     DynamicPolicyEFCore.InitializeDatabaseAsync(scopedServices).Wait();
     #endif
     #endif
     #if (CommentSystem)
     #if (!NoDb)
     CommentsDatabase.InitializeDatabaseAsync(scopedServices).Wait();
     #endif
     #endif
     #if (Forum)
     #if (!NoDb)
     ForumDatabase.InitializeDatabaseAsync(scopedServices).Wait();
     #endif
     #endif
 }