From 8dd1a83a6fd962ce71b2b6b7b8a1d8e70f60a426 Mon Sep 17 00:00:00 2001 From: hishamco Date: Fri, 16 Sep 2022 21:18:03 +0300 Subject: [PATCH] Use AddDataMigration() --- src/OrchardCore.Modules/OrchardCore.AdminDashboard/Startup.cs | 2 +- src/OrchardCore.Modules/OrchardCore.Alias/Startup.cs | 2 +- src/OrchardCore.Modules/OrchardCore.ArchiveLater/Startup.cs | 2 +- src/OrchardCore.Modules/OrchardCore.AuditTrail/Startup.cs | 2 +- src/OrchardCore.Modules/OrchardCore.Autoroute/Startup.cs | 2 +- src/OrchardCore.Modules/OrchardCore.ContentFields/Startup.cs | 2 +- .../ServiceCollectionExtensions.cs | 2 +- src/OrchardCore.Modules/OrchardCore.ContentPreview/Startup.cs | 2 +- .../OrchardCore.Contents/AuditTrail/Startup.cs | 2 +- src/OrchardCore.Modules/OrchardCore.Contents/Startup.cs | 2 +- src/OrchardCore.Modules/OrchardCore.Demo/Startup.cs | 2 +- src/OrchardCore.Modules/OrchardCore.Flows/Startup.cs | 2 +- src/OrchardCore.Modules/OrchardCore.Forms/Startup.cs | 2 +- src/OrchardCore.Modules/OrchardCore.Html/Startup.cs | 2 +- src/OrchardCore.Modules/OrchardCore.Indexing/Startup.cs | 2 +- src/OrchardCore.Modules/OrchardCore.Layers/Startup.cs | 2 +- src/OrchardCore.Modules/OrchardCore.Liquid/Startup.cs | 2 +- src/OrchardCore.Modules/OrchardCore.Lists/Startup.cs | 2 +- src/OrchardCore.Modules/OrchardCore.Markdown/Startup.cs | 2 +- src/OrchardCore.Modules/OrchardCore.Media/Startup.cs | 2 +- src/OrchardCore.Modules/OrchardCore.Menu/Startup.cs | 2 +- src/OrchardCore.Modules/OrchardCore.PublishLater/Startup.cs | 2 +- src/OrchardCore.Modules/OrchardCore.ReCaptcha/Forms/Startup.cs | 2 +- src/OrchardCore.Modules/OrchardCore.Seo/Startup.cs | 2 +- src/OrchardCore.Modules/OrchardCore.Sitemaps/Startup.cs | 2 +- src/OrchardCore.Modules/OrchardCore.Taxonomies/Startup.cs | 2 +- src/OrchardCore.Modules/OrchardCore.Title/Startup.cs | 2 +- src/OrchardCore.Modules/OrchardCore.Users/Startup.cs | 2 +- src/OrchardCore.Modules/OrchardCore.Widgets/Startup.cs | 2 +- src/OrchardCore.Modules/OrchardCore.Workflows/Startup.cs | 2 +- .../ServiceCollectionExtensions.cs | 2 +- .../content/OrchardCore.Templates.Cms.Module/Startup.cs | 2 +- 32 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/OrchardCore.Modules/OrchardCore.AdminDashboard/Startup.cs b/src/OrchardCore.Modules/OrchardCore.AdminDashboard/Startup.cs index b3b030f14d5..13855f471e2 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminDashboard/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminDashboard/Startup.cs @@ -42,7 +42,7 @@ public override void ConfigureServices(IServiceCollection services) services.AddScoped(); - services.AddScoped(); + services.AddDataMigration(); } public override void Configure(IApplicationBuilder builder, IEndpointRouteBuilder routes, IServiceProvider serviceProvider) diff --git a/src/OrchardCore.Modules/OrchardCore.Alias/Startup.cs b/src/OrchardCore.Modules/OrchardCore.Alias/Startup.cs index 17631b3a50b..7346fd590dd 100644 --- a/src/OrchardCore.Modules/OrchardCore.Alias/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.Alias/Startup.cs @@ -59,7 +59,7 @@ public override void ConfigureServices(IServiceCollection services) services.AddScoped(sp => sp.GetRequiredService()); services.AddScoped(sp => sp.GetRequiredService()); - services.AddScoped(); + services.AddDataMigration(); services.AddScoped(); // Identity Part diff --git a/src/OrchardCore.Modules/OrchardCore.ArchiveLater/Startup.cs b/src/OrchardCore.Modules/OrchardCore.ArchiveLater/Startup.cs index 3ce9e8b3000..dd1999e5366 100644 --- a/src/OrchardCore.Modules/OrchardCore.ArchiveLater/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.ArchiveLater/Startup.cs @@ -29,7 +29,7 @@ public override void ConfigureServices(IServiceCollection services) .AddContentPart() .UseDisplayDriver(); - services.AddScoped(); + services.AddDataMigration(); services.AddScoped(); services.AddScoped(sp => sp.GetRequiredService()); diff --git a/src/OrchardCore.Modules/OrchardCore.AuditTrail/Startup.cs b/src/OrchardCore.Modules/OrchardCore.AuditTrail/Startup.cs index cdafba2d486..4b61f2a067c 100644 --- a/src/OrchardCore.Modules/OrchardCore.AuditTrail/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.AuditTrail/Startup.cs @@ -55,7 +55,7 @@ public override void ConfigureServices(IServiceCollection services) services.Configure(o => o.Collections.Add(AuditTrailEvent.Collection)); - services.AddScoped(); + services.AddDataMigration(); services.AddSingleton(); services.AddSingleton(); diff --git a/src/OrchardCore.Modules/OrchardCore.Autoroute/Startup.cs b/src/OrchardCore.Modules/OrchardCore.Autoroute/Startup.cs index 27ac1ae4b0b..28633a49ed1 100644 --- a/src/OrchardCore.Modules/OrchardCore.Autoroute/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.Autoroute/Startup.cs @@ -82,7 +82,7 @@ public override void ConfigureServices(IServiceCollection services) services.AddScoped(sp => sp.GetRequiredService()); services.AddScoped(sp => sp.GetRequiredService()); - services.AddScoped(); + services.AddDataMigration(); services.AddSingleton(); services.AddScoped(); diff --git a/src/OrchardCore.Modules/OrchardCore.ContentFields/Startup.cs b/src/OrchardCore.Modules/OrchardCore.ContentFields/Startup.cs index 294e5cd068f..5dff6834101 100644 --- a/src/OrchardCore.Modules/OrchardCore.ContentFields/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.ContentFields/Startup.cs @@ -134,7 +134,7 @@ public override void ConfigureServices(IServiceCollection services) services.AddScoped(); // Migration, can be removed in a future release. - services.AddScoped(); + services.AddDataMigration(); } public override void Configure(IApplicationBuilder builder, IEndpointRouteBuilder routes, IServiceProvider serviceProvider) diff --git a/src/OrchardCore.Modules/OrchardCore.ContentLocalization/ServiceCollectionExtensions.cs b/src/OrchardCore.Modules/OrchardCore.ContentLocalization/ServiceCollectionExtensions.cs index aadc2d3382d..763badabe2e 100644 --- a/src/OrchardCore.Modules/OrchardCore.ContentLocalization/ServiceCollectionExtensions.cs +++ b/src/OrchardCore.Modules/OrchardCore.ContentLocalization/ServiceCollectionExtensions.cs @@ -26,7 +26,7 @@ public static IServiceCollection AddContentLocalization(this IServiceCollection services.AddScoped(sp => sp.GetRequiredService()); services.AddScoped(sp => sp.GetRequiredService()); - services.AddScoped(); + services.AddDataMigration(); services.AddScoped(); return services; diff --git a/src/OrchardCore.Modules/OrchardCore.ContentPreview/Startup.cs b/src/OrchardCore.Modules/OrchardCore.ContentPreview/Startup.cs index 9695494c269..b1d805463c8 100644 --- a/src/OrchardCore.Modules/OrchardCore.ContentPreview/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.ContentPreview/Startup.cs @@ -26,7 +26,7 @@ public override void ConfigureServices(IServiceCollection services) services.AddContentPart() .AddHandler(); - services.AddScoped(); + services.AddDataMigration(); services.AddScoped(); services.TryAddEnumerable(ServiceDescriptor.Singleton()); } diff --git a/src/OrchardCore.Modules/OrchardCore.Contents/AuditTrail/Startup.cs b/src/OrchardCore.Modules/OrchardCore.Contents/AuditTrail/Startup.cs index fe4bed4e6ae..b69433097bc 100644 --- a/src/OrchardCore.Modules/OrchardCore.Contents/AuditTrail/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.Contents/AuditTrail/Startup.cs @@ -36,7 +36,7 @@ public Startup(IOptions adminOptions) public override void ConfigureServices(IServiceCollection services) { - services.AddScoped(); + services.AddDataMigration(); services.AddContentPart() .UseDisplayDriver(); diff --git a/src/OrchardCore.Modules/OrchardCore.Contents/Startup.cs b/src/OrchardCore.Modules/OrchardCore.Contents/Startup.cs index 987d3e401bc..8eee9b893cd 100644 --- a/src/OrchardCore.Modules/OrchardCore.Contents/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.Contents/Startup.cs @@ -165,7 +165,7 @@ async Task GetContentByHandleAsync(LiquidTemplateContext context, st services.AddScoped(); services.AddScoped(); - services.AddScoped(); + services.AddDataMigration(); // Common Part services.AddContentPart() diff --git a/src/OrchardCore.Modules/OrchardCore.Demo/Startup.cs b/src/OrchardCore.Modules/OrchardCore.Demo/Startup.cs index 724af449eac..0c68d779729 100644 --- a/src/OrchardCore.Modules/OrchardCore.Demo/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.Demo/Startup.cs @@ -93,7 +93,7 @@ public override void ConfigureServices(IServiceCollection services) services.AddShapeAttributes(); services.AddScoped(); services.AddScoped(); - services.AddScoped(); + services.AddDataMigration(); services.AddScoped(); services.AddContentPart(); services.AddScoped(); diff --git a/src/OrchardCore.Modules/OrchardCore.Flows/Startup.cs b/src/OrchardCore.Modules/OrchardCore.Flows/Startup.cs index 81425dae715..736a1d08901 100644 --- a/src/OrchardCore.Modules/OrchardCore.Flows/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.Flows/Startup.cs @@ -57,7 +57,7 @@ public override void ConfigureServices(IServiceCollection services) services.AddContentPart(); - services.AddScoped(); + services.AddDataMigration(); } public override void Configure(IApplicationBuilder app, IEndpointRouteBuilder routes, IServiceProvider serviceProvider) diff --git a/src/OrchardCore.Modules/OrchardCore.Forms/Startup.cs b/src/OrchardCore.Modules/OrchardCore.Forms/Startup.cs index d621d6d4bf1..f0ff50d0f15 100644 --- a/src/OrchardCore.Modules/OrchardCore.Forms/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.Forms/Startup.cs @@ -72,7 +72,7 @@ public override void ConfigureServices(IServiceCollection services) services.AddContentPart() .UseDisplayDriver(); - services.AddScoped(); + services.AddDataMigration(); } } } diff --git a/src/OrchardCore.Modules/OrchardCore.Html/Startup.cs b/src/OrchardCore.Modules/OrchardCore.Html/Startup.cs index e7ea6d63760..4ba19266480 100644 --- a/src/OrchardCore.Modules/OrchardCore.Html/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.Html/Startup.cs @@ -29,7 +29,7 @@ public override void ConfigureServices(IServiceCollection services) services.AddScoped(); services.AddScoped(); services.AddScoped(); - services.AddScoped(); + services.AddDataMigration(); services.AddScoped(); } } diff --git a/src/OrchardCore.Modules/OrchardCore.Indexing/Startup.cs b/src/OrchardCore.Modules/OrchardCore.Indexing/Startup.cs index 80f5ed06346..8fed0e446e1 100644 --- a/src/OrchardCore.Modules/OrchardCore.Indexing/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.Indexing/Startup.cs @@ -15,7 +15,7 @@ public override void ConfigureServices(IServiceCollection services) { services.AddScoped(); services.AddScoped(); - services.AddScoped(); + services.AddDataMigration(); } } } diff --git a/src/OrchardCore.Modules/OrchardCore.Layers/Startup.cs b/src/OrchardCore.Modules/OrchardCore.Layers/Startup.cs index 56741f6c186..072473e9bd3 100644 --- a/src/OrchardCore.Modules/OrchardCore.Layers/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.Layers/Startup.cs @@ -60,7 +60,7 @@ public override void ConfigureServices(IServiceCollection services) services.AddScoped(); services.AddScoped(); services.AddSingleton(); - services.AddScoped(); + services.AddDataMigration(); services.AddScoped(); services.AddRecipeExecutionStep(); diff --git a/src/OrchardCore.Modules/OrchardCore.Liquid/Startup.cs b/src/OrchardCore.Modules/OrchardCore.Liquid/Startup.cs index 1b1b332af01..3f4d374c94b 100644 --- a/src/OrchardCore.Modules/OrchardCore.Liquid/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.Liquid/Startup.cs @@ -89,7 +89,7 @@ public override void ConfigureServices(IServiceCollection services) .UseDisplayDriver() .AddHandler(); - services.AddScoped(); + services.AddDataMigration(); services.AddScoped(); } } diff --git a/src/OrchardCore.Modules/OrchardCore.Lists/Startup.cs b/src/OrchardCore.Modules/OrchardCore.Lists/Startup.cs index 555487ffca9..77c0bd07fdd 100644 --- a/src/OrchardCore.Modules/OrchardCore.Lists/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.Lists/Startup.cs @@ -68,7 +68,7 @@ public override void ConfigureServices(IServiceCollection services) .AddHandler(); services.AddScoped(); - services.AddScoped(); + services.AddDataMigration(); services.AddScoped(); services.AddScoped(); } diff --git a/src/OrchardCore.Modules/OrchardCore.Markdown/Startup.cs b/src/OrchardCore.Modules/OrchardCore.Markdown/Startup.cs index 54ad28714e4..a408af71958 100644 --- a/src/OrchardCore.Modules/OrchardCore.Markdown/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.Markdown/Startup.cs @@ -48,7 +48,7 @@ public override void ConfigureServices(IServiceCollection services) .AddHandler(); services.AddScoped(); - services.AddScoped(); + services.AddDataMigration(); services.AddScoped(); // Markdown Field diff --git a/src/OrchardCore.Modules/OrchardCore.Media/Startup.cs b/src/OrchardCore.Modules/OrchardCore.Media/Startup.cs index 6bf60d222f4..0b66a6078fe 100644 --- a/src/OrchardCore.Modules/OrchardCore.Media/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.Media/Startup.cs @@ -159,7 +159,7 @@ public override void ConfigureServices(IServiceCollection services) services.AddScoped(); services.AddScoped(); services.AddScoped(); - services.AddScoped(); + services.AddDataMigration(); services.AddScoped(); services.AddMediaFileTextProvider(".pdf"); diff --git a/src/OrchardCore.Modules/OrchardCore.Menu/Startup.cs b/src/OrchardCore.Modules/OrchardCore.Menu/Startup.cs index 93c1a6fd802..886d02ba192 100644 --- a/src/OrchardCore.Modules/OrchardCore.Menu/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.Menu/Startup.cs @@ -34,7 +34,7 @@ public Startup(IOptions adminOptions) public override void ConfigureServices(IServiceCollection services) { - services.AddScoped(); + services.AddDataMigration(); services.AddScoped(); services.AddScoped(); services.AddScoped(); diff --git a/src/OrchardCore.Modules/OrchardCore.PublishLater/Startup.cs b/src/OrchardCore.Modules/OrchardCore.PublishLater/Startup.cs index 2db25717151..fa10200c08b 100644 --- a/src/OrchardCore.Modules/OrchardCore.PublishLater/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.PublishLater/Startup.cs @@ -31,7 +31,7 @@ public override void ConfigureServices(IServiceCollection services) .UseDisplayDriver() .AddHandler(); - services.AddScoped(); + services.AddDataMigration(); services.AddScoped(); services.AddScoped(sp => sp.GetRequiredService()); diff --git a/src/OrchardCore.Modules/OrchardCore.ReCaptcha/Forms/Startup.cs b/src/OrchardCore.Modules/OrchardCore.ReCaptcha/Forms/Startup.cs index 275a2495e5c..801d73fff82 100644 --- a/src/OrchardCore.Modules/OrchardCore.ReCaptcha/Forms/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.ReCaptcha/Forms/Startup.cs @@ -20,7 +20,7 @@ public override void ConfigureServices(IServiceCollection services) services.AddContentPart() .UseDisplayDriver(); - services.AddScoped(); + services.AddDataMigration(); } } } diff --git a/src/OrchardCore.Modules/OrchardCore.Seo/Startup.cs b/src/OrchardCore.Modules/OrchardCore.Seo/Startup.cs index 620ea55dcda..68c2596fa0d 100644 --- a/src/OrchardCore.Modules/OrchardCore.Seo/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.Seo/Startup.cs @@ -15,7 +15,7 @@ public class Startup : StartupBase { public override void ConfigureServices(IServiceCollection services) { - services.AddScoped(); + services.AddDataMigration(); services.AddContentPart() .UseDisplayDriver() diff --git a/src/OrchardCore.Modules/OrchardCore.Sitemaps/Startup.cs b/src/OrchardCore.Modules/OrchardCore.Sitemaps/Startup.cs index 0fc4c1c0b0f..4d731e72765 100644 --- a/src/OrchardCore.Modules/OrchardCore.Sitemaps/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.Sitemaps/Startup.cs @@ -41,7 +41,7 @@ public Startup(IOptions adminOptions) public override void ConfigureServices(IServiceCollection services) { - services.AddScoped(); + services.AddDataMigration(); services.AddScoped(); services.AddScoped(); diff --git a/src/OrchardCore.Modules/OrchardCore.Taxonomies/Startup.cs b/src/OrchardCore.Modules/OrchardCore.Taxonomies/Startup.cs index 2e2c558f984..982ff35d10a 100644 --- a/src/OrchardCore.Modules/OrchardCore.Taxonomies/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.Taxonomies/Startup.cs @@ -59,7 +59,7 @@ public override void ConfigureServices(IServiceCollection services) .AddLiquidFilter("inherited_terms") .AddLiquidFilter("taxonomy_terms"); - services.AddScoped(); + services.AddDataMigration(); services.AddScoped(); services.AddScoped(); diff --git a/src/OrchardCore.Modules/OrchardCore.Title/Startup.cs b/src/OrchardCore.Modules/OrchardCore.Title/Startup.cs index f9630af86df..e1143648573 100644 --- a/src/OrchardCore.Modules/OrchardCore.Title/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.Title/Startup.cs @@ -33,7 +33,7 @@ public override void ConfigureServices(IServiceCollection services) services.AddScoped(); services.AddScoped(); - services.AddScoped(); + services.AddDataMigration(); } } } diff --git a/src/OrchardCore.Modules/OrchardCore.Users/Startup.cs b/src/OrchardCore.Modules/OrchardCore.Users/Startup.cs index 666b3c07820..df89334ff88 100644 --- a/src/OrchardCore.Modules/OrchardCore.Users/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.Users/Startup.cs @@ -195,7 +195,7 @@ public override void ConfigureServices(IServiceCollection services) services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); - services.AddScoped(); + services.AddDataMigration(); services.AddScoped(); services.AddScoped, DefaultUserClaimsPrincipalProviderFactory>(); diff --git a/src/OrchardCore.Modules/OrchardCore.Widgets/Startup.cs b/src/OrchardCore.Modules/OrchardCore.Widgets/Startup.cs index 4ed1189b81a..c6c41b83e50 100644 --- a/src/OrchardCore.Modules/OrchardCore.Widgets/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.Widgets/Startup.cs @@ -37,7 +37,7 @@ public override void ConfigureServices(IServiceCollection services) services.AddScoped(); services.AddContentPart(); - services.AddScoped(); + services.AddDataMigration(); } public override void Configure(IApplicationBuilder app, IEndpointRouteBuilder routes, IServiceProvider serviceProvider) diff --git a/src/OrchardCore.Modules/OrchardCore.Workflows/Startup.cs b/src/OrchardCore.Modules/OrchardCore.Workflows/Startup.cs index 104b9e08178..cb0b213dadb 100644 --- a/src/OrchardCore.Modules/OrchardCore.Workflows/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.Workflows/Startup.cs @@ -61,7 +61,7 @@ public override void ConfigureServices(IServiceCollection services) services.AddScoped(); services.AddScoped(); services.AddScoped(); - services.AddScoped(); + services.AddDataMigration(); services.AddScoped(); services.AddScoped(); services.AddScoped, MissingActivityDisplayDriver>(); diff --git a/src/OrchardCore/OrchardCore.ContentManagement/ServiceCollectionExtensions.cs b/src/OrchardCore/OrchardCore.ContentManagement/ServiceCollectionExtensions.cs index 5564e2d147b..f48e39aa10a 100644 --- a/src/OrchardCore/OrchardCore.ContentManagement/ServiceCollectionExtensions.cs +++ b/src/OrchardCore/OrchardCore.ContentManagement/ServiceCollectionExtensions.cs @@ -20,7 +20,7 @@ public static IServiceCollection AddContentManagement(this IServiceCollection se services.TryAddScoped(); services.TryAddScoped(); services.AddSingleton(); - services.AddScoped(); + services.AddDataMigration(); services.AddScoped(); services.AddScoped(); services.AddSingleton, ContentPartFactory>(); diff --git a/src/Templates/OrchardCore.ProjectTemplates/content/OrchardCore.Templates.Cms.Module/Startup.cs b/src/Templates/OrchardCore.ProjectTemplates/content/OrchardCore.Templates.Cms.Module/Startup.cs index cd6f25956fd..970ef1884ba 100644 --- a/src/Templates/OrchardCore.ProjectTemplates/content/OrchardCore.Templates.Cms.Module/Startup.cs +++ b/src/Templates/OrchardCore.ProjectTemplates/content/OrchardCore.Templates.Cms.Module/Startup.cs @@ -34,7 +34,7 @@ public override void ConfigureServices(IServiceCollection services) .AddHandler(); services.AddScoped(); - services.AddScoped(); + services.AddDataMigration(); #endif }