Skip to content

Commit

Permalink
Merge pull request #56 from Lombiq/issue/NEST-401
Browse files Browse the repository at this point in the history
NEST-401: Upgrade to Orchard Core pre-1.6 nightly
  • Loading branch information
Piedone committed Feb 22, 2023
2 parents 8176b5f + a687f01 commit 123cadd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using Microsoft.Extensions.DependencyInjection;
using OrchardCore.Data.Migration;

namespace Lombiq.BaseTheme.Extensions;

// We need to use this until the Orchard Core upgrade so we don't have to upgrade submodules to nightly versions. This
// is the same method as what is in the 1.6 nightly version of Orchard Core. During the upgrade, this can be removed and
// use the Orchard Core method for data migrations.

/// <summary>
/// Provides extension methods for <see cref="IServiceCollection"/> to add YesSql migration <see cref="IDataMigration"/>.
/// </summary>
public static class MigrationServiceCollectionExtensions
{
public static IServiceCollection AddDataMigration<TDataMigration>(this IServiceCollection services)
where TDataMigration : class, IDataMigration => services.AddScoped<IDataMigration, TDataMigration>();
}
2 changes: 1 addition & 1 deletion Lombiq.BaseTheme/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Lombiq.BaseTheme.Extensions;
using Lombiq.BaseTheme.Middlewares;
using Lombiq.BaseTheme.Migrations;
using Lombiq.BaseTheme.Services;
Expand All @@ -8,7 +9,6 @@
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using OrchardCore.Data.Migration;
using OrchardCore.Modules;
using OrchardCore.ResourceManagement;
using System;
Expand Down

0 comments on commit 123cadd

Please sign in to comment.