< Summary

Information
Class: Elsa.Persistence.EFCore.Modules.Management.EFCoreWorkflowDefinitionPersistenceFeature
Assembly: Elsa.Persistence.EFCore
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore/Modules/Management/WorkflowDefinitionPersistenceFeature.cs
Line coverage
100%
Covered lines: 9
Uncovered lines: 0
Coverable lines: 9
Total lines: 31
Line coverage: 100%
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
.ctor(...)100%11100%
Configure()100%11100%
Apply()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore/Modules/Management/WorkflowDefinitionPersistenceFeature.cs

#LineLine coverage
 1using Elsa.Features.Attributes;
 2using Elsa.Features.Services;
 3using Elsa.Workflows.Management.Entities;
 4using Elsa.Workflows.Management.Features;
 5using Microsoft.Extensions.DependencyInjection;
 6
 7namespace Elsa.Persistence.EFCore.Modules.Management;
 8
 9/// <summary>
 10/// Configures the <see cref="WorkflowDefinitionsFeature"/> feature with an Entity Framework Core persistence provider.
 11/// </summary>
 12[DependsOn(typeof(WorkflowManagementFeature))]
 13[DependsOn(typeof(WorkflowDefinitionsFeature))]
 114public class EFCoreWorkflowDefinitionPersistenceFeature(IModule module) : PersistenceFeatureBase<EFCoreWorkflowDefinitio
 15{
 16    /// <inheritdoc />
 17    public override void Configure()
 18    {
 119        Module.Configure<WorkflowDefinitionsFeature>(feature =>
 120        {
 32521            feature.WorkflowDefinitionStore = sp => sp.GetRequiredService<EFCoreWorkflowDefinitionStore>();
 222        });
 123    }
 24
 25    /// <inheritdoc />
 26    public override void Apply()
 27    {
 128        base.Apply();
 129        AddEntityStore<WorkflowDefinition, EFCoreWorkflowDefinitionStore>();
 130    }
 31}