< Summary - Jellyfin

Information
Class: Jellyfin.Server.Implementations.Migrations.DesignTimeJellyfinDbFactory
Assembly: Jellyfin.Server.Implementations
File(s): /srv/git/jellyfin/Jellyfin.Server.Implementations/Migrations/DesignTimeJellyfinDbFactory.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 3
Coverable lines: 3
Total lines: 20
Line coverage: 0%
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

Coverage history

Coverage history 0 25 50 75 100

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
CreateDbContext(...)100%210%

File(s)

/srv/git/jellyfin/Jellyfin.Server.Implementations/Migrations/DesignTimeJellyfinDbFactory.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore;
 2using Microsoft.EntityFrameworkCore.Design;
 3
 4namespace Jellyfin.Server.Implementations.Migrations
 5{
 6    /// <summary>
 7    /// The design time factory for <see cref="JellyfinDbContext"/>.
 8    /// This is only used for the creation of migrations and not during runtime.
 9    /// </summary>
 10    internal class DesignTimeJellyfinDbFactory : IDesignTimeDbContextFactory<JellyfinDbContext>
 11    {
 12        public JellyfinDbContext CreateDbContext(string[] args)
 13        {
 014            var optionsBuilder = new DbContextOptionsBuilder<JellyfinDbContext>();
 015            optionsBuilder.UseSqlite("Data Source=jellyfin.db");
 16
 017            return new JellyfinDbContext(optionsBuilder.Options);
 18        }
 19    }
 20}