| | | 1 | | using System.Reflection; |
| | | 2 | | using CShells.Features; |
| | | 3 | | using Elsa.PackageManifest.Generator.Hints; |
| | | 4 | | using Elsa.Persistence.EFCore.Extensions; |
| | | 5 | | using Elsa.Persistence.EFCore.Modules.Alterations; |
| | | 6 | | using JetBrains.Annotations; |
| | | 7 | | using Microsoft.EntityFrameworkCore; |
| | | 8 | | |
| | | 9 | | namespace Elsa.Persistence.EFCore.SqlServer.ShellFeatures.Alterations; |
| | | 10 | | |
| | | 11 | | /// <summary> |
| | | 12 | | /// Configures the alterations feature to use SqlServer persistence. |
| | | 13 | | /// </summary> |
| | | 14 | | [ShellFeature( |
| | | 15 | | DisplayName = "SqlServer Alterations Persistence", |
| | | 16 | | Description = "Provides SqlServer persistence for workflow alterations", |
| | | 17 | | DependsOn = ["Alterations"])] |
| | | 18 | | [UsedImplicitly] |
| | | 19 | | [ManifestInfrastructure("sqlserver-database", "database", Reason = "Stores workflow alteration records in SQL Server.", |
| | | 20 | | public class SqlServerAlterationsPersistenceShellFeature |
| | | 21 | | : EFCoreAlterationsPersistenceShellFeatureBase |
| | | 22 | | { |
| | | 23 | | /// <inheritdoc /> |
| | | 24 | | protected override void ConfigureProvider(DbContextOptionsBuilder builder, Assembly migrationsAssembly, string conne |
| | | 25 | | { |
| | 0 | 26 | | builder.UseElsaSqlServer(migrationsAssembly, connectionString, options); |
| | 0 | 27 | | } |
| | | 28 | | } |