migration succesfull

This commit is contained in:
Natlinux81
2022-08-20 03:20:45 +02:00
parent 0418c55bf9
commit 7313cc9a21
6 changed files with 182 additions and 25 deletions

View File

@@ -34,7 +34,7 @@ namespace Apollon.WPF
public App()
{
string connectionString = "Data Source=NATHALIE-PC\\NATLINUXDB;Database=Apollon;Trusted_Connection=True;MultipleActiveResultSets=true";
string connectionString = "Server=NATHALIE-PC\\NATLINUXDB;Database=Apollon;Trusted_Connection=True;MultipleActiveResultSets=true";
_modalNavigationStore = new ModalNavigationStore();
_tournamentsDbContextFactory = new TournamentsDbContextFactory(
@@ -48,6 +48,11 @@ namespace Apollon.WPF
}
protected override void OnStartup(StartupEventArgs e)
{
using(TournamentsDbContext context = _tournamentsDbContextFactory.Create())
{
context.Database.Migrate();
}
OverviewViewModel overviewViewModel = new OverviewViewModel(
_tournamentStore,
_selectedTournamentStore,