using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Design; namespace PLib.Infrastructure.Persistence; /// /// Used only by dotnet ef when it needs a context without running the application. /// The connection string is irrelevant for generating migrations — nothing connects. /// public sealed class DesignTimeDbContextFactory : IDesignTimeDbContextFactory { public LibraryDbContext CreateDbContext(string[] args) => new(new DbContextOptionsBuilder() .UseSqlite("Data Source=design-time.db") .Options); }