Merge feature/feat-13: Abgabevertrag phase B — SaleContract+wizard, /einstellungen Zuchtprofil, contract endpoints w/ transactional Abgabe, Kontakt structured fields [god-QA: 40/40+47/47+e2e 56/56]

# Conflicts:
#	GerbilManager.Tests/GerbilManager.Tests.csproj
#	GerbilManagerWebAPI/Program.cs
This commit is contained in:
2026-06-06 08:00:55 +02:00
31 changed files with 3018 additions and 21 deletions

View File

@@ -51,8 +51,13 @@ app.MapOpenApi();
app.MapScalarApiReference();
// Apply EF migrations at startup (no-op if schema is current; safe for single-instance deploy).
using (var scope = app.Services.CreateScope())
// Unter "Testing" übersprungen: die Endpoint-Tests laufen auf SQLite in-memory
// (EnsureCreated) — die Npgsql-Migrationen sind dort nicht anwendbar.
if (!app.Environment.IsEnvironment("Testing"))
{
using var scope = app.Services.CreateScope();
scope.ServiceProvider.GetRequiredService<ApplicationContext>().Database.Migrate();
}
app.UseCors(LanCorsPolicy);
@@ -68,5 +73,10 @@ app.MapInbreedingEndpoints();
app.MapPhotoEndpoints();
app.MapSaleAdEndpoints();
app.MapImportEndpoints();
app.MapContractEndpoints();
app.MapSettingsEndpoints();
app.Run();
// Sichtbarer Programmtyp für WebApplicationFactory<Program> (Endpoint-Tests).
public partial class Program { }