Multi-agent AI laboratory with ASP.NET Core 8.0 backend and Flutter frontend. Implements CQRS architecture, OpenAPI contract-first API design. BACKEND: Agent management, conversations, executions with PostgreSQL + Ollama FRONTEND: Cross-platform UI with strict typing and Result-based error handling Co-Authored-By: Jean-Philippe Brule <jp@svrnty.io>
22 lines
755 B
C#
22 lines
755 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Design;
|
|
|
|
namespace Codex.Dal;
|
|
|
|
/// <summary>
|
|
/// Factory for creating DbContext at design time (for migrations).
|
|
/// </summary>
|
|
public class DesignTimeDbContextFactory : IDesignTimeDbContextFactory<CodexDbContext>
|
|
{
|
|
public CodexDbContext CreateDbContext(string[] args)
|
|
{
|
|
var optionsBuilder = new DbContextOptionsBuilder<CodexDbContext>();
|
|
|
|
// Use a default connection string for design-time operations
|
|
// This will be replaced by the actual connection string at runtime from appsettings.json
|
|
optionsBuilder.UseNpgsql("Host=localhost;Database=codex;Username=jean-philippe");
|
|
|
|
return new CodexDbContext(optionsBuilder.Options);
|
|
}
|
|
}
|