< Summary

Information
Class: Elsa.Persistence.EFCore.PostgreSql.PostgreSqlDesignTimeDbContextFactory<T>
Assembly: Elsa.Persistence.EFCore.PostgreSql
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore.PostgreSql/DbContextFactories.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 4
Coverable lines: 4
Total lines: 47
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
ConfigureServices(...)100%210%
ConfigureBuilder(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore.PostgreSql/DbContextFactories.cs

#LineLine coverage
 1using Elsa.Persistence.EFCore.Abstractions;
 2using Elsa.Persistence.EFCore.Extensions;
 3using Elsa.Persistence.EFCore.Modules.Alterations;
 4using Elsa.Persistence.EFCore.Modules.Identity;
 5using Elsa.Persistence.EFCore.Modules.Labels;
 6using Elsa.Persistence.EFCore.Modules.Management;
 7using Elsa.Persistence.EFCore.Modules.Runtime;
 8using Elsa.Persistence.EFCore.Modules.Tenants;
 9using Elsa.Persistence.EFCore.PostgreSql.Handlers;
 10using JetBrains.Annotations;
 11using Microsoft.EntityFrameworkCore;
 12using Microsoft.Extensions.DependencyInjection;
 13
 14#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
 15
 16namespace Elsa.Persistence.EFCore.PostgreSql;
 17
 18[UsedImplicitly]
 19public class IdentityDbContextFactory : PostgreSqlDesignTimeDbContextFactory<IdentityElsaDbContext>;
 20
 21[UsedImplicitly]
 22public class ManagementDbContextFactory : PostgreSqlDesignTimeDbContextFactory<ManagementElsaDbContext>;
 23
 24[UsedImplicitly]
 25public class RuntimeDbContextFactory : PostgreSqlDesignTimeDbContextFactory<RuntimeElsaDbContext>;
 26
 27[UsedImplicitly]
 28public class LabelsDbContextFactory : PostgreSqlDesignTimeDbContextFactory<LabelsElsaDbContext>;
 29
 30[UsedImplicitly]
 31public class AlterationsDbContextFactories : PostgreSqlDesignTimeDbContextFactory<AlterationsElsaDbContext>;
 32
 33[UsedImplicitly]
 34public class TenantsDbContextFactories : PostgreSqlDesignTimeDbContextFactory<TenantsElsaDbContext>;
 35
 36public class PostgreSqlDesignTimeDbContextFactory<TDbContext> : DesignTimeDbContextFactoryBase<TDbContext> where TDbCont
 37{
 38    protected override void ConfigureServices(IServiceCollection services)
 39    {
 040        services.AddScoped<IEntityModelCreatingHandler, SetupForPostgreSql>();
 041    }
 42
 43    protected override void ConfigureBuilder(DbContextOptionsBuilder<TDbContext> builder, string connectionString)
 44    {
 045        builder.UseElsaPostgreSql(GetType().Assembly, connectionString);
 046    }
 47}