< Summary

Information
Class: Elsa.Persistence.EFCore.Sqlite.ShellFeatures.Runtime.SqliteWorkflowRuntimePersistenceShellFeature
Assembly: Elsa.Persistence.EFCore.Sqlite
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore.Sqlite/ShellFeatures/Runtime/SqliteWorkflowRuntimePersistenceShellFeature.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 5
Coverable lines: 5
Total lines: 34
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
ConfigureProvider(...)100%210%
OnConfiguring(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore.Sqlite/ShellFeatures/Runtime/SqliteWorkflowRuntimePersistenceShellFeature.cs

#LineLine coverage
 1using System.Reflection;
 2using CShells.Features;
 3using Elsa.Persistence.EFCore.Extensions;
 4using Elsa.Persistence.EFCore.Modules.Runtime;
 5using JetBrains.Annotations;
 6using Microsoft.EntityFrameworkCore;
 7using Microsoft.Extensions.DependencyInjection;
 8
 9namespace Elsa.Persistence.EFCore.Sqlite.ShellFeatures.Runtime;
 10
 11/// <summary>
 12/// Configures the runtime feature to use Sqlite persistence.
 13/// </summary>
 14[ShellFeature(
 15    DisplayName = "Sqlite Workflow Runtime Persistence",
 16    Description = "Provides Sqlite persistence for workflow runtime",
 17    DependsOn = ["WorkflowRuntime"])]
 18[UsedImplicitly]
 19public class SqliteWorkflowRuntimePersistenceShellFeature
 20    : EFCoreWorkflowRuntimePersistenceShellFeatureBase
 21{
 22    /// <inheritdoc />
 23    protected override void ConfigureProvider(DbContextOptionsBuilder builder, Assembly migrationsAssembly, string conne
 24    {
 025        builder.UseElsaSqlite(migrationsAssembly, connectionString, options);
 026    }
 27
 28    /// <inheritdoc />
 29    protected override void OnConfiguring(IServiceCollection services)
 30    {
 031        services.AddScoped<IEntityModelCreatingHandler, SetupForSqlite>();
 032        base.OnConfiguring(services);
 033    }
 34}