< Summary

Information
Class: Elsa.Persistence.EFCore.Extensions.DbContextOptionsBuilderExtensions
Assembly: Elsa.Persistence.EFCore.Sqlite
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore.Sqlite/DbContextOptionsBuilderExtensions.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 10
Coverable lines: 10
Total lines: 27
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
UseElsaSqlite(...)0%620%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore.Sqlite/DbContextOptionsBuilderExtensions.cs

#LineLine coverage
 1using System.Reflection;
 2using Microsoft.EntityFrameworkCore;
 3using Microsoft.EntityFrameworkCore.Infrastructure;
 4
 5// ReSharper disable once CheckNamespace
 6namespace Elsa.Persistence.EFCore.Extensions;
 7
 8/// <summary>
 9/// Contains extension methods for <see cref="DbContextOptionsBuilder"/>.
 10/// </summary>
 11public static class DbContextOptionsBuilderExtensions
 12{
 13    /// <summary>
 14    /// Configures Entity Framework Core with SQLite.
 15    /// </summary>
 16    public static DbContextOptionsBuilder UseElsaSqlite(this DbContextOptionsBuilder builder, Assembly migrationsAssembl
 017        builder
 018            .UseElsaDbContextOptions(options)
 019            .UseSqlite(connectionString, db =>
 020            {
 021                db
 022                    .MigrationsAssembly(options.GetMigrationsAssemblyName(migrationsAssembly))
 023                    .MigrationsHistoryTable(options.GetMigrationsHistoryTableName(), options.GetSchemaName());
 024
 025                configure?.Invoke(db);
 026            });
 27}