Referenzen entfernt

This commit is contained in:
2023-04-11 19:56:36 +02:00
parent c4fd240f59
commit 1c3e3c876b
13 changed files with 31 additions and 103 deletions

View File

@@ -1,7 +1,5 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using SewerStammGen.EntityFramework;
using SewerStammGen.HostBuilders;
using SewerStammGen.WPF.ViewModel;
using System;
@@ -31,8 +29,8 @@ namespace SewerStammGen.WPF
.AddConfiguration()
.AddServices()
.AddViewModels()
.AddStores()
.AddDBContext();
.AddStores();
}
protected override void OnStartup(StartupEventArgs e)
@@ -42,11 +40,7 @@ namespace SewerStammGen.WPF
_host.Start();
SewerStammGenDbContextFactory contextFactory = _host.Services.GetRequiredService<SewerStammGenDbContextFactory>();
using(SewerStammGenDbContext context = contextFactory.CreateDbContext())
{
context.Database.Migrate();
}
MainWindow? window = new MainWindow() { DataContext = _host.Services.GetRequiredService<MainWindowViewModel>() };
window.Show();