R3 Slice 1: EF-Core-Infrastruktur im Core + InitialCore-Migration

- Pomelo.EntityFrameworkCore.MySql 8.0.3 + EF Core Design 8.0.11 (Core), NuGet-Allowlist erweitert
- Configuration/DatabaseOptions + DatabaseServerVersion (MariaDB 11.8.6 gepinnt)
- Persistence/Entities: CorePosition, CoreTrade, CoreBudget, CoreWorkerLog, CoreSetting
- Persistence/Ef/CoreDbContext (core_-Tabellen) + Design-Time-Factory (env IBKRTRADER_MYSQL)
- DependencyInjection/AddCorePersistence (AddDbContextFactory), in Program verdrahtet
  (Connection aus appsettings.Local.json)
- EF-Migration InitialCore erzeugt (5 core_-Tabellen)
- Consumer noch auf Dapper (folgt in Slice 2); Build + 30/30 Tests + smoke-ui gruen

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@
This commit is contained in:
Richard
2026-07-28 10:40:09 +02:00
parent 48c662a699
commit 261032f9f9
12 changed files with 782 additions and 9 deletions
+5 -6
View File
@@ -92,12 +92,11 @@ IBKRTrader.App (WinExe, Root) Generic Host + Shell (Launcher) + C
App legt keine Tabellen zur Laufzeit an. Server: **MariaDB 11.8.6** (via `--db-version` bestätigt) →
Pin `new MariaDbServerVersion(new Version(11, 8, 6))`. Verbindung aus `appsettings.Local.json`.
- [x] `--db-version`-Diagnose (Serverversion für den EF-Pin)
- [ ] `Configuration/DatabaseOptions` (aus appsettings.Local.json) + `DatabaseServerVersion`-Pin
- [ ] `AddCorePersistence` + `CoreDbContext` + Entities + EF-Repos (core_position, core_trade_history, core_budget, core_worker_log, core_settings)
- [ ] Consumer umstellen: `PortfolioService`, `BudgetService`, `TradeHistoryService`, `WorkerBase`-Log, IBKR
- [ ] Modul-DbContext (ct_) im CongressTrading-Projekt + EF-Repo
- [ ] EF-Migrationen erzeugen (`dotnet ef migrations add`); Dapper + manuelle Migrationen entfernen
- Hinweis: nur build-verifizierbar (Unit-Tests laufen ohne DB); Schema-Anwendung erfolgt extern
- [x] **Slice 1:** `Configuration/DatabaseOptions` + `DatabaseServerVersion`-Pin (MariaDB 11.8.6); `AddCorePersistence` (`AddDbContextFactory`) + `CoreDbContext` + Entities (core_position, core_trade_history, core_budget, core_worker_log, core_settings) + Design-Time-Factory; **EF-Migration `InitialCore` erzeugt**
- [ ] **Slice 2:** Consumer umstellen: `PortfolioService`, `BudgetService`, `TradeHistoryService`, `WorkerBase`-Log
- [ ] **Slice 3:** Modul-DbContext (ct_) im CongressTrading-Projekt + Umstellung
- [ ] **Slice 4:** Dapper + `DatabaseService` + manuelle Migrationen (CoreMigrations/IBKRMigrations/CongressMigrations) entfernen; IBKR-Marktdaten auf EF
- Hinweis: nur build-verifizierbar (Unit-Tests ohne DB); Schema-Anwendung extern via `dotnet ef database update` (env `IBKRTRADER_MYSQL`)
### R4 Trading-Kern einфügen
- [ ] Risk/Execution/Portfolio/Broker-Seam nach Core/Trading (aus Phase 3 portiert)