| | | 1 | | using Elsa.Alterations.Core.Entities; |
| | | 2 | | using Elsa.Alterations.Features; |
| | | 3 | | using Elsa.Features.Attributes; |
| | | 4 | | using Elsa.Features.Services; |
| | | 5 | | using Microsoft.Extensions.DependencyInjection; |
| | | 6 | | |
| | | 7 | | namespace Elsa.Persistence.EFCore.Modules.Alterations; |
| | | 8 | | |
| | | 9 | | /// <summary> |
| | | 10 | | /// Configures the default workflow runtime to use EF Core persistence providers. |
| | | 11 | | /// </summary> |
| | | 12 | | [DependsOn(typeof(AlterationsFeature))] |
| | 1 | 13 | | public class EFCoreAlterationsPersistenceFeature(IModule module) : PersistenceFeatureBase<EFCoreAlterationsPersistenceFe |
| | | 14 | | { |
| | | 15 | | /// <inheritdoc /> |
| | | 16 | | public override void Configure() |
| | | 17 | | { |
| | 1 | 18 | | Module.Configure<AlterationsFeature>(feature => |
| | 1 | 19 | | { |
| | 321 | 20 | | feature.AlterationPlanStoreFactory = sp => sp.GetRequiredService<EFCoreAlterationPlanStore>(); |
| | 321 | 21 | | feature.AlterationJobStoreFactory = sp => sp.GetRequiredService<EFCoreAlterationJobStore>(); |
| | 2 | 22 | | }); |
| | 1 | 23 | | } |
| | | 24 | | |
| | | 25 | | /// <inheritdoc /> |
| | | 26 | | public override void Apply() |
| | | 27 | | { |
| | 1 | 28 | | base.Apply(); |
| | 1 | 29 | | AddEntityStore<AlterationPlan, EFCoreAlterationPlanStore>(); |
| | 1 | 30 | | AddEntityStore<AlterationJob, EFCoreAlterationJobStore>(); |
| | 1 | 31 | | } |
| | | 32 | | } |