Projekte können erstellt und geladen werden

This commit is contained in:
2023-03-30 20:56:21 +02:00
parent e5214e44c3
commit 70bba66df3
32 changed files with 1050 additions and 93 deletions

View File

@@ -1,5 +1,7 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using SewerStammGen.EntityFramework;
using SewerStammGen.HostBuilders;
using SewerStammGen.WPF.ViewModel;
using System;
@@ -40,6 +42,12 @@ 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();