Forge
csharp3407750f
1using Microsoft.EntityFrameworkCore;
2using Microsoft.EntityFrameworkCore.Design;
3using OutWit.Database.EntityFramework.Extensions;
4
5namespace AgentForge.Data;
6
7/// <summary>Design-time DbContext for EF migrations without starting the web host or plugin loader.</summary>
8public sealed class ForgeDesignTimeDbContextFactory : IDesignTimeDbContextFactory<ForgeDbContext>
9{
10 public ForgeDbContext CreateDbContext(string[] args)
11 {
12 var options = new DbContextOptionsBuilder<ForgeDbContext>()
13 .UseWitDb("Data Source=forge-design-time.db")
14 .Options;
15 return new ForgeDbContext(options);
16 }
17}
18
View only · write via MCP/CIDE