< Summary

Information
Class: Elsa.Persistence.EFCore.Modules.Runtime.RuntimeElsaDbContext
Assembly: Elsa.Persistence.EFCore
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore/Modules/Runtime/DbContext.cs
Line coverage
100%
Covered lines: 19
Uncovered lines: 0
Coverable lines: 19
Total lines: 71
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_WorkflowInboxMessages()100%11100%
get_Triggers()100%11100%
get_WorkflowExecutionLogRecords()100%11100%
get_ActivityExecutionRecords()100%11100%
get_Bookmarks()100%11100%
get_BookmarkQueueItems()100%11100%
get_KeyValuePairs()100%11100%
OnModelCreating(...)100%11100%

File(s)

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

#LineLine coverage
 1using Elsa.KeyValues.Entities;
 2using Elsa.Workflows.Runtime.Entities;
 3using Microsoft.EntityFrameworkCore;
 4
 5namespace Elsa.Persistence.EFCore.Modules.Runtime;
 6
 7/// <summary>
 8/// DB context for the runtime module.
 9/// </summary>
 10public class RuntimeElsaDbContext : ElsaDbContextBase
 11{
 12    /// <inheritdoc />
 266513    public RuntimeElsaDbContext(DbContextOptions<RuntimeElsaDbContext> options, IServiceProvider serviceProvider) : base
 14    {
 266515    }
 16
 17    #region Obsolete
 18
 19    /// <summary>
 20    /// The workflow inbox messages.
 21    /// </summary>
 22    [Obsolete("Use BookmarkQueueItems instead.")]
 266523    public DbSet<WorkflowInboxMessage> WorkflowInboxMessages { get; set; } = null!;
 24
 25    #endregion
 26
 27    /// <summary>
 28    /// The workflow triggers.
 29    /// </summary>
 266530    public DbSet<StoredTrigger> Triggers { get; set; } = null!;
 31
 32    /// <summary>
 33    /// The workflow execution log records.
 34    /// </summary>
 266535    public DbSet<WorkflowExecutionLogRecord> WorkflowExecutionLogRecords { get; set; } = null!;
 36
 37    /// <summary>
 38    /// The activity execution records.
 39    /// </summary>
 266540    public DbSet<ActivityExecutionRecord> ActivityExecutionRecords { get; set; } = null!;
 41
 42    /// <summary>
 43    /// The workflow bookmarks.
 44    /// </summary>
 266545    public DbSet<StoredBookmark> Bookmarks { get; set; } = null!;
 46
 47    /// <summary>
 48    /// The bookmark queue items.
 49    /// </summary>
 266550    public DbSet<BookmarkQueueItem> BookmarkQueueItems { get; set; } = null!;
 51
 52    /// <summary>
 53    /// The generic key value pairs.
 54    /// </summary>
 266555    public DbSet<SerializedKeyValuePair> KeyValuePairs { get; set; } = null!;
 56
 57    /// <inheritdoc />
 58    protected override void OnModelCreating(ModelBuilder modelBuilder)
 59    {
 160        var config = new Configurations();
 161        modelBuilder.ApplyConfiguration<StoredTrigger>(config);
 162        modelBuilder.ApplyConfiguration<WorkflowExecutionLogRecord>(config);
 163        modelBuilder.ApplyConfiguration<ActivityExecutionRecord>(config);
 164        modelBuilder.ApplyConfiguration<StoredBookmark>(config);
 165        modelBuilder.ApplyConfiguration<BookmarkQueueItem>(config);
 166        modelBuilder.ApplyConfiguration<SerializedKeyValuePair>(config);
 167        modelBuilder.ApplyConfiguration<WorkflowInboxMessage>(config);
 68
 169        base.OnModelCreating(modelBuilder);
 170    }
 71}