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

Information
Class: Microsoft.Extensions.DependencyInjection.SqlServerInfrastructureRegistration
Assembly: ZhEaIsNsAaBn.Infrastructure.SqlServer
File(s): /home/runner/work/ZhEaIsNsAaBn.Libraries.V1/ZhEaIsNsAaBn.Libraries.V1/src/DataBasePackages/ZhEaIsNsAaBn.Infrastructure.SqlServer/SqlServerInfrastructureRegistration.cs
Line coverage
100%
Covered lines: 2
Uncovered lines: 0
Coverable lines: 2
Total lines: 24
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
WithSqlServer(...)100%11100%

File(s)

/home/runner/work/ZhEaIsNsAaBn.Libraries.V1/ZhEaIsNsAaBn.Libraries.V1/src/DataBasePackages/ZhEaIsNsAaBn.Infrastructure.SqlServer/SqlServerInfrastructureRegistration.cs

#LineLine coverage
 1// ReSharper disable once CheckNamespace
 2namespace Microsoft.Extensions.DependencyInjection;
 3
 4/// <summary>Core-builder entry point of the SQL Server infrastructure provider.</summary>
 5public static class SqlServerInfrastructureRegistration
 6{
 7    /// <summary>
 8    /// Gives the context of this builder (the most recent <c>WithDbContext&lt;T&gt;()</c>) the SQL Server handlers. Onl
 9    /// <c>Build()</c> adds <c>UseSqlServerInfrastructure()</c> to that context's options in every mode (scoped, custom,
 10    /// Other contexts are not affected. Calling it twice adds the handlers once.
 11    /// </summary>
 12    /// <example><code>services.AddInfrastructureCore().WithDbContext&lt;AppDbContext&gt;( o =&gt; o.UseSqlServer( cs ) 
 13    /// <typeparam name="TDbContext">The context type.</typeparam>
 14    /// <param name="builder">The builder of the context.</param>
 15    /// <returns>The same builder.</returns>
 16    /// <exception cref="ArgumentNullException"><paramref name="builder"/> is <see langword="null"/>.</exception>
 17    public static IInfrastructureBuilder<TDbContext> WithSqlServer< TDbContext >( this IInfrastructureBuilder<TDbContext
 18        where TDbContext : DbContext
 19    {
 4420        ArgumentNullException.ThrowIfNull( builder );
 21
 4022        return builder.ConfigureDbContextOptions( options => options.UseSqlServerInfrastructure() );
 23    }
 24}