< Summary

Information
Class: Elsa.Persistence.EFCore.Extensions.DatabaseFacadeExtensions
Assembly: Elsa.Persistence.EFCore.PostgreSql
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore.PostgreSql/Extensions/DatabaseFacadeExtensions.cs
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 15
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
IsPostgres(...)100%11100%

File(s)

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

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Infrastructure;
 2
 3// ReSharper disable once CheckNamespace
 4namespace Elsa.Persistence.EFCore.Extensions;
 5
 6/// <summary>
 7/// Extension methods for the DatabaseFacade class.
 8/// </summary>
 9public static class DatabaseFacadeExtensions
 10{
 11    /// <summary>
 12    /// Returns true if the database provider is Postgres.
 13    /// </summary>
 2914    public static bool IsPostgres(this DatabaseFacade database) => database.ProviderName == "Npgsql.EntityFrameworkCore.
 15}