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

Information
Class: ZhEaIsNsAaBn.DbSeeder.DbSeederRegistration
Assembly: ZhEaIsNsAaBn.DbSeeder
File(s): /home/runner/work/ZhEaIsNsAaBn.Libraries.V1/ZhEaIsNsAaBn.Libraries.V1/src/DataBasePackages/ZhEaIsNsAaBn.DbSeeder/DbSeederRegistration.cs
Line coverage
100%
Covered lines: 2
Uncovered lines: 0
Coverable lines: 2
Total lines: 36
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
AddDbSeeder(...)100%11100%

File(s)

/home/runner/work/ZhEaIsNsAaBn.Libraries.V1/ZhEaIsNsAaBn.Libraries.V1/src/DataBasePackages/ZhEaIsNsAaBn.DbSeeder/DbSeederRegistration.cs

#LineLine coverage
 1#region Usings
 2using ZhEaIsNsAaBn.DbSeeder.Registrations;
 3#endregion
 4
 5namespace ZhEaIsNsAaBn.DbSeeder;
 6
 7/// <summary>Registers seed migrations for a context.</summary>
 8public static class DbSeederRegistration
 9{
 10    /// <summary>Starts the seed-migration registration of <typeparamref name="TDbContext"/>. Finish with <c>Build()</c>
 11    /// <typeparam name="TDbContext">The context the migrations belong to.</typeparam>
 12    /// <param name="services">The service collection.</param>
 13    /// <returns>The builder.</returns>
 14    /// <exception cref="ArgumentNullException"><paramref name="services"/> is <see langword="null"/>.</exception>
 15    /// <example>
 16    /// <code>
 17    /// services.AddDbSeeder&lt;AppDbContext&gt;()
 18    ///         .FromAssembly( typeof( AppDbContext ).Assembly )
 19    ///         .Configure( options =&gt;
 20    ///                     {
 21    ///                         options.SystemUser( 1, "system" );
 22    ///                         options.ApplyConfigurationsFromAssembly( typeof( AppDbContext ).Assembly );
 23    ///                         options.Entity&lt;Country&gt;().MatchBy( x =&gt; x.IsoCode );
 24    ///                     } )
 25    ///         .UseSqlServer()
 26    ///         .Build();
 27    /// </code>
 28    /// </example>
 29    public static IDbSeederBuilder<TDbContext> AddDbSeeder< TDbContext >( this IServiceCollection services )
 30        where TDbContext : DbContext
 31    {
 59632        ArgumentNullException.ThrowIfNull( services );
 33
 59634        return new DbSeederBuilder<TDbContext>( services );
 35    }
 36}