< Summary - Syki

Information
Class: Syki.Back.Configs.EfCoreConfigs
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Configs/EfCoreConfigs.cs
Tag: 4_16869239191
Line coverage
93%
Covered lines: 15
Uncovered lines: 1
Coverable lines: 16
Total lines: 26
Line coverage: 93.7%
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
AddEfCoreConfigs(...)100%1193.75%

File(s)

/home/runner/work/syki/syki/Back/Configs/EfCoreConfigs.cs

#LineLine coverage
 1using Npgsql;
 2
 3namespace Syki.Back.Configs;
 4
 5public static class EfCoreConfigs
 6{
 7    public static void AddEfCoreConfigs(this WebApplicationBuilder builder)
 8    {
 49        builder.Services.AddSingleton(sp =>
 410        {
 411            var dataSourceBuilder = new NpgsqlDataSourceBuilder(builder.Configuration.Database().ConnectionString);
 412
 413            dataSourceBuilder.ConfigureTracing(x =>
 414            {
 415                x.ConfigureCommandSpanNameProvider(provider =>
 416                {
 017                    return provider.CommandText.GetSqlSpanName();
 418                });
 819            });
 420
 421            return dataSourceBuilder.Build();
 422        });
 23
 424        builder.Services.AddDbContext<SykiDbContext>();
 425    }
 26}