Exemplo n.º 1
0
        private static void EnsureDataStorageIsReady(IServiceProvider scopedServices)
        {
            var deleteLogsOlderThanDays = 90;

            LoggingEFStartup.InitializeDatabaseAsync(scopedServices, deleteLogsOlderThanDays).Wait();
            CoreEFStartup.InitializeDatabaseAsync(scopedServices).Wait();
            SimpleContentEFStartup.InitializeDatabaseAsync(scopedServices).Wait();
            KvpEFCoreStartup.InitializeDatabaseAsync(scopedServices).Wait();
            DynamicPolicyEFCore.InitializeDatabaseAsync(scopedServices).Wait();
        }
Exemplo n.º 2
0
        private static void EnsureDataStorageIsReady(IServiceProvider scopedServices)
        {
            var deleteLogsOlderThanDays = 90;

            LoggingEFStartup.InitializeDatabaseAsync(scopedServices, deleteLogsOlderThanDays).Wait();
            CoreEFStartup.InitializeDatabaseAsync(scopedServices).Wait();
            KvpEFCoreStartup.InitializeDatabaseAsync(scopedServices).Wait();
            CloudscribeIdentityServerIntegrationEFCoreStorage.InitializeDatabaseAsync(scopedServices).Wait();
            DynamicPolicyEFCore.InitializeDatabaseAsync(scopedServices).Wait();
        }
Exemplo n.º 3
0
        private static void EnsureDataStorageIsReady(IServiceProvider scopedServices)
        {
            LoggingEFStartup.InitializeDatabaseAsync(scopedServices).Wait();
            CoreEFStartup.InitializeDatabaseAsync(scopedServices).Wait();
            SimpleContentEFStartup.InitializeDatabaseAsync(scopedServices).Wait();
            EmailQueueDatabase.InitializeDatabaseAsync(scopedServices).Wait();
            EmailTemplateDatabase.InitializeDatabaseAsync(scopedServices).Wait();
            MembershipDatabase.InitializeDatabaseAsync(scopedServices).Wait();
            DynamicPolicyEFCore.InitializeDatabaseAsync(scopedServices).Wait();

            StripeDatabase.InitializeDatabaseAsync(scopedServices).Wait();
        }
        private static void EnsureDataStorageIsReady(IConfiguration config, IServiceProvider scopedServices)
        {
            var storage = config["DevOptions:DbPlatform"];

            switch (storage)
            {
            case "NoDb":
                CoreNoDbStartup.InitializeDataAsync(scopedServices).Wait();
                break;

            case "ef":
            default:
                LoggingEFStartup.InitializeDatabaseAsync(scopedServices).Wait();
                CoreEFStartup.InitializeDatabaseAsync(scopedServices).Wait();
                SimpleContentEFStartup.InitializeDatabaseAsync(scopedServices).Wait();

                DynamicPolicyEFCore.InitializeDatabaseAsync(scopedServices).Wait();


                break;
            }
        }
Exemplo n.º 5
0
 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
 }