Referenzen entfernt
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user