-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from Lombiq/issue/NEST-401
NEST-401: Upgrade to Orchard Core pre-1.6 nightly
- Loading branch information
Showing
2 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
Lombiq.Privacy/Extensions/MigrationServiceCollectionExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Microsoft.Extensions.DependencyInjection; | ||
using OrchardCore.Data.Migration; | ||
|
||
namespace Lombiq.Privacy.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>(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters