elsa-core/src/modules/Elsa.Alterations/Extensions/ServiceCollectionExtensions.cs
Sipke Schoorstra ff1f0833ad
Restore EF Core persistence layer (#6931)
* Restore EF Core persistence layer

Originally, we had moved EF Core to the extensions repo, but in practice this turned out to be rather impractical when debugging elsa-core, given that we would lose all of the state (workflow definitions, instances, etc.) across application restarts.

* Integrate PostgreSQL support into EF Core persistence and enhance BlobStorage workflows provider setup.
2025-09-27 20:39:18 +02:00

27 lines
994 B
C#

using Elsa.Alterations.AlterationHandlers;
using Elsa.Alterations.AlterationTypes;
using Elsa.Alterations.Core.Extensions;
using Elsa.Alterations.Features;
using Microsoft.Extensions.DependencyInjection;
namespace Elsa.Alterations.Extensions;
/// <summary>
/// Extension methods for <see cref="IServiceCollection"/>.
/// </summary>
public static class ServiceCollectionExtensions
{
/// <summary>
/// Adds various alteration handlers.
/// </summary>
public static IServiceCollection AddAlterations(this IServiceCollection services)
{
services.AddAlteration<Migrate, MigrateHandler>();
services.AddAlteration<ModifyVariable, ModifyVariableHandler>();
services.AddAlteration<ScheduleActivity, ScheduleActivityHandler>();
services.AddAlteration<CancelActivity, CancelActivityHandler>();
services.AddAlteration<Cancel, CancelHandler>();
services.AddNotificationHandlersFrom<AlterationsFeature>();
return services;
}
}