< Summary

Information
Class: Elsa.Persistence.EFCore.Modules.Identity.IdentityElsaDbContext
Assembly: Elsa.Persistence.EFCore
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore/Modules/Identity/DbContext.cs
Line coverage
100%
Covered lines: 11
Uncovered lines: 0
Coverable lines: 11
Total lines: 41
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_Users()100%11100%
get_Applications()100%11100%
get_Roles()100%11100%
OnModelCreating(...)100%11100%

File(s)

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

#LineLine coverage
 1using Elsa.Identity.Entities;
 2using Microsoft.EntityFrameworkCore;
 3
 4namespace Elsa.Persistence.EFCore.Modules.Identity;
 5
 6/// <summary>
 7/// The database context for the Identity module.
 8/// </summary>
 9public class IdentityElsaDbContext : ElsaDbContextBase
 10{
 11    /// <inheritdoc />
 112    public IdentityElsaDbContext(DbContextOptions<IdentityElsaDbContext> options, IServiceProvider serviceProvider) : ba
 13    {
 114    }
 15
 16    /// <summary>
 17    /// The users.
 18    /// </summary>
 119    public DbSet<User> Users { get; set; } = null!;
 20
 21    /// <summary>
 22    /// The applications.
 23    /// </summary>
 124    public DbSet<Application> Applications { get; set; } = null!;
 25
 26    /// <summary>
 27    /// The roles.
 28    /// </summary>
 129    public DbSet<Role> Roles { get; set; } = null!;
 30
 31    /// <inheritdoc />
 32    protected override void OnModelCreating(ModelBuilder modelBuilder)
 33    {
 134        var config = new Configurations();
 135        modelBuilder.ApplyConfiguration<User>(config);
 136        modelBuilder.ApplyConfiguration<Application>(config);
 137        modelBuilder.ApplyConfiguration<Role>(config);
 38
 139        base.OnModelCreating(modelBuilder);
 140    }
 41}