< Summary

Information
Class: Elsa.Persistence.EFCore.Modules.Alterations.AlterationsElsaDbContext
Assembly: Elsa.Persistence.EFCore
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore/Modules/Alterations/DbContext.cs
Line coverage
100%
Covered lines: 12
Uncovered lines: 0
Coverable lines: 12
Total lines: 42
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%
get_AlterationPlans()100%11100%
get_AlterationJobs()100%11100%
OnModelCreating(...)100%11100%

File(s)

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

#LineLine coverage
 1using Elsa.Alterations.Core.Entities;
 2using Elsa.Alterations.Core.Models;
 3using Elsa.Workflows.Management.Models;
 4using JetBrains.Annotations;
 5using Microsoft.EntityFrameworkCore;
 6
 7namespace Elsa.Persistence.EFCore.Modules.Alterations;
 8
 9/// <summary>
 10/// DB context for the runtime module.
 11/// </summary>
 12[UsedImplicitly]
 13public class AlterationsElsaDbContext : ElsaDbContextBase
 14{
 15    /// <inheritdoc />
 116    public AlterationsElsaDbContext(DbContextOptions<AlterationsElsaDbContext> options, IServiceProvider serviceProvider
 17    {
 118    }
 19
 20    /// <summary>
 21    /// The alteration plans.
 22    /// </summary>
 123    public DbSet<AlterationPlan> AlterationPlans { get; set; } = null!;
 24
 25    /// <summary>
 26    /// The alteration jobs.
 27    /// </summary>
 128    public DbSet<AlterationJob> AlterationJobs { get; set; } = null!;
 29
 30    /// <inheritdoc />
 31    protected override void OnModelCreating(ModelBuilder modelBuilder)
 32    {
 133        modelBuilder.Ignore<AlterationLogEntry>();
 134        modelBuilder.Ignore<AlterationWorkflowInstanceFilter>();
 135        modelBuilder.Ignore<TimestampFilter>();
 36
 137        var configuration = new Configurations();
 138        modelBuilder.ApplyConfiguration<AlterationPlan>(configuration);
 139        modelBuilder.ApplyConfiguration<AlterationJob>(configuration);
 140        base.OnModelCreating(modelBuilder);
 141    }
 42}