< Summary - ZhEaIsNsAaBn.Libraries coverage (affected: 23 packages)

Information
Class: Microsoft.EntityFrameworkCore.DbExceptionExtensions
Assembly: ZhEaIsNsAaBn.Infrastructure.Core
File(s): /home/runner/work/ZhEaIsNsAaBn.Libraries.V1/ZhEaIsNsAaBn.Libraries.V1/src/DataBasePackages/ZhEaIsNsAaBn.Infrastructure.Core/Extensions/DbExceptionExtensions.cs
Line coverage
100%
Covered lines: 3
Uncovered lines: 0
Coverable lines: 3
Total lines: 23
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
Classify(...)100%11100%

File(s)

/home/runner/work/ZhEaIsNsAaBn.Libraries.V1/ZhEaIsNsAaBn.Libraries.V1/src/DataBasePackages/ZhEaIsNsAaBn.Infrastructure.Core/Extensions/DbExceptionExtensions.cs

#LineLine coverage
 1// ReSharper disable once CheckNamespace
 2namespace Microsoft.EntityFrameworkCore;
 3
 4/// <summary>
 5/// Provider-neutral exception classification. Provider-specific classification (SQL error numbers) lives in the provide
 6/// e.g. <c>ZhEaIsNsAaBn.Infrastructure.SqlServer</c>, behind <c>IDbErrorClassifier</c>.
 7/// </summary>
 8public static class DbExceptionExtensions
 9{
 10    /// <summary>Classifies a concurrency conflict. Additional data: <c>Entities</c> (the entity type names involved).</
 11    /// <param name="exception">The exception.</param>
 12    /// <returns>The <c>ConcurrencyException</c> error.</returns>
 13    /// <exception cref="ArgumentNullException"><paramref name="exception"/> is <see langword="null"/>.</exception>
 14    public static Error Classify( this DbUpdateConcurrencyException exception )
 15    {
 1016        ArgumentNullException.ThrowIfNull( exception );
 17
 1018        var entities = string.Join( ", ", exception.Entries.Select( e => e.Metadata.DisplayName() ).Distinct( StringComp
 19
 20
 1021        return EfExceptions.ConcurrencyException( exception, new Dictionary<string, object> { [ "Entities" ] = entities 
 22    }
 23}