< Summary

Information
Class: Elsa.Persistence.EFCore.Modules.Labels.LabelsElsaDbContext
Assembly: Elsa.Persistence.EFCore
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore/Modules/Labels/DbContext.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 9
Coverable lines: 9
Total lines: 24
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
.ctor(...)100%210%
get_Labels()100%210%
get_WorkflowDefinitionLabels()100%210%
OnModelCreating(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore/Modules/Labels/DbContext.cs

#LineLine coverage
 1using Elsa.Labels.Entities;
 2using Microsoft.EntityFrameworkCore;
 3
 4namespace Elsa.Persistence.EFCore.Modules.Labels;
 5
 6public class LabelsElsaDbContext : ElsaDbContextBase
 7{
 08    public LabelsElsaDbContext(DbContextOptions<LabelsElsaDbContext> options, IServiceProvider serviceProvider) : base(o
 9    {
 010    }
 11
 012    public DbSet<Label> Labels { get; set; } = null!;
 013    public DbSet<WorkflowDefinitionLabel> WorkflowDefinitionLabels { get; set; } = null!;
 14
 15    /// <inheritdoc />
 16    protected override void OnModelCreating(ModelBuilder modelBuilder)
 17    {
 018        base.OnModelCreating(modelBuilder);
 19
 020        var config = new Configurations();
 021        modelBuilder.ApplyConfiguration<Label>(config);
 022        modelBuilder.ApplyConfiguration<WorkflowDefinitionLabel>(config);
 023    }
 24}