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