< Summary

Information
Class: Elsa.Persistence.EFCore.SharedPersistenceSettings
Assembly: Elsa.Persistence.EFCore.Common
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore.Common/SharedPersistenceSettings.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 5
Coverable lines: 5
Total lines: 38
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_ConnectionString()100%210%
get_DbContextOptions()100%210%
get_UseContextPooling()100%210%
get_RunMigrations()100%210%
get_DbContextFactoryLifetime()100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore.Common/SharedPersistenceSettings.cs

#LineLine coverage
 1using Microsoft.Extensions.DependencyInjection;
 2
 3// ReSharper disable once CheckNamespace
 4namespace Elsa.Persistence.EFCore;
 5
 6/// <summary>
 7/// Represents shared persistence settings that can be cascaded to dependent persistence features.
 8/// When a combined persistence feature (e.g., SqliteWorkflowPersistence) is configured,
 9/// it can register these shared settings that individual features will use as defaults.
 10/// </summary>
 11public class SharedPersistenceSettings
 12{
 13    /// <summary>
 14    /// Gets or sets the connection string to use for the database.
 15    /// </summary>
 016    public string? ConnectionString { get; set; }
 17
 18    /// <summary>
 19    /// Gets or sets additional options to configure the database context.
 20    /// </summary>
 021    public ElsaDbContextOptions? DbContextOptions { get; set; }
 22
 23    /// <summary>
 24    /// Gets or sets a value indicating whether to use context pooling.
 25    /// </summary>
 026    public bool? UseContextPooling { get; set; }
 27
 28    /// <summary>
 29    /// Gets or sets a value indicating whether to run migrations.
 30    /// </summary>
 031    public bool? RunMigrations { get; set; }
 32
 33    /// <summary>
 34    /// Gets or sets the lifetime of the DbContextFactory.
 35    /// </summary>
 036    public ServiceLifetime? DbContextFactoryLifetime { get; set; }
 37}
 38