Aufgabe OR-Mapper

This commit is contained in:
2025-06-16 15:01:00 +02:00
parent 8813c83ed9
commit 92893665fe
8 changed files with 101 additions and 5 deletions

View File

@@ -21,7 +21,9 @@ namespace FahzeugWPF
ServiceCollection services = new ServiceCollection();
services.AddScoped<IKonfigurationsleser>(sp => new Konfigurationsleser(configuration));
services.AddScoped(sp => new FahrzeugRepository(sp.GetRequiredService<IKonfigurationsleser>().LiesDBVerebindung()));
services.AddScoped(sp => new DatenbankKontext(sp.GetRequiredService<IKonfigurationsleser>().LiesDBVerebindung()));
// services.AddScoped<IFahrzeugRepository>(sp => new FahrzeugRepository(sp.GetRequiredService<IKonfigurationsleser>().LiesDBVerebindung()));
services.AddScoped<IFahrzeugRepository, FahrzeugOrmRepository>();
services.AddScoped<FahrzeugeModell>();
services.AddScoped<EinfuegenModel>();
services.AddScoped<EinfuegenWindow>();