< 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: 33
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.Expressions.Options;
 2using Elsa.Features.Attributes;
 3using Elsa.Features.Services;
 4using Elsa.Workflows.Management.Entities;
 5using Elsa.Workflows.Management.Features;
 6using Elsa.Workflows.Options;
 7using Microsoft.Extensions.DependencyInjection;
 8
 9namespace Elsa.Persistence.EFCore.Modules.Management;
 10
 11/// <summary>
 12/// Configures the <see cref="WorkflowDefinitionsFeature"/> feature with an Entity Framework Core persistence provider.
 13/// </summary>
 14[DependsOn(typeof(WorkflowManagementFeature))]
 15[DependsOn(typeof(WorkflowDefinitionsFeature))]
 316public class EFCoreWorkflowDefinitionPersistenceFeature(IModule module) : PersistenceFeatureBase<EFCoreWorkflowDefinitio
 17{
 18    /// <inheritdoc />
 19    public override void Configure()
 20    {
 321        Module.Configure<WorkflowDefinitionsFeature>(feature =>
 322        {
 42923            feature.WorkflowDefinitionStore = sp => sp.GetRequiredService<EFCoreWorkflowDefinitionStore>();
 624        });
 325    }
 26
 27    /// <inheritdoc />
 28    public override void Apply()
 29    {
 330        base.Apply();
 331        AddEntityStore<WorkflowDefinition, EFCoreWorkflowDefinitionStore>();
 332    }
 33}