elsa-core/src/modules/Elsa.Persistence.EFCore.Common/SharedPersistenceSettings.cs
Sipke Schoorstra 743c963dfb
Introduce Combined Persistence Shell Features
- Implemented `CombinedPersistenceShellFeatureBase` for unified configuration of EF Core persistence components.
- Added `SharedPersistenceSettings` for shared configuration across multiple persistence shell features.
- Updated shell features for SQL Server, MySQL, PostgreSQL, SQLite, and Oracle to use a unified persistence approach.
- Refactored `PersistenceShellFeatureBase` to enable fallback to shared settings.
2026-02-13 22:11:11 +01:00

39 lines
1.3 KiB
C#

using Microsoft.Extensions.DependencyInjection;
// ReSharper disable once CheckNamespace
namespace Elsa.Persistence.EFCore;
/// <summary>
/// Represents shared persistence settings that can be cascaded to dependent persistence features.
/// When a combined persistence feature (e.g., SqliteWorkflowPersistence) is configured,
/// it can register these shared settings that individual features will use as defaults.
/// </summary>
public class SharedPersistenceSettings
{
/// <summary>
/// Gets or sets the connection string to use for the database.
/// </summary>
public string? ConnectionString { get; set; }
/// <summary>
/// Gets or sets additional options to configure the database context.
/// </summary>
public ElsaDbContextOptions? DbContextOptions { get; set; }
/// <summary>
/// Gets or sets a value indicating whether to use context pooling.
/// </summary>
public bool? UseContextPooling { get; set; }
/// <summary>
/// Gets or sets a value indicating whether to run migrations.
/// </summary>
public bool? RunMigrations { get; set; }
/// <summary>
/// Gets or sets the lifetime of the DbContextFactory.
/// </summary>
public ServiceLifetime? DbContextFactoryLifetime { get; set; }
}