< Summary

Information
Class: Elsa.Persistence.EFCore.Modules.Tenants.TenantsElsaDbContext
Assembly: Elsa.Persistence.EFCore
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore/Modules/Tenants/DbContext.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 7
Coverable lines: 7
Total lines: 31
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_Tenants()100%210%
OnModelCreating(...)100%210%

File(s)

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

#LineLine coverage
 1using Elsa.Common.Multitenancy;
 2using JetBrains.Annotations;
 3using Microsoft.EntityFrameworkCore;
 4using NJsonSchema.Annotations;
 5
 6namespace Elsa.Persistence.EFCore.Modules.Tenants;
 7
 8/// <summary>
 9/// DB context for the runtime module.
 10/// </summary>
 11[UsedImplicitly]
 12public class TenantsElsaDbContext : ElsaDbContextBase
 13{
 14    /// <inheritdoc />
 015    public TenantsElsaDbContext(DbContextOptions<TenantsElsaDbContext> options, IServiceProvider serviceProvider) : base
 16    {
 017    }
 18
 19    /// <summary>
 20    /// The alteration plans.
 21    /// </summary>
 022    public DbSet<Tenant> Tenants { get; set; } = null!;
 23
 24    /// <inheritdoc />
 25    protected override void OnModelCreating(ModelBuilder modelBuilder)
 26    {
 027        var configuration = new Configurations();
 028        modelBuilder.ApplyConfiguration(configuration);
 029        base.OnModelCreating(modelBuilder);
 030    }
 31}