clean up a bit

This commit is contained in:
Natlinux
2022-11-11 01:56:15 +01:00
parent d4dd7a545a
commit 83ce97c501
16 changed files with 47 additions and 29 deletions

View File

@@ -24,7 +24,7 @@ namespace Apollon.WPF
{
private readonly NavigationStore _navigationStore;
private readonly ModalNavigationStore _modalNavigationStore;
private readonly TournamentsDbContextFactory _tournamentsDbContextFactory;
private readonly ApplicationDBContextFactory _tournamentsDbContextFactory;
private readonly IGetAllTournamentsQuery _getAllTournamentQuery;
private readonly ICreateTournamentCommand _createTournamentCommand;
private readonly IUpdateTournamentCommand _updateTournamentCommand;
@@ -38,7 +38,7 @@ namespace Apollon.WPF
_navigationStore = new NavigationStore();
_modalNavigationStore = new ModalNavigationStore();
_tournamentsDbContextFactory = new TournamentsDbContextFactory(
_tournamentsDbContextFactory = new ApplicationDBContextFactory(
new DbContextOptionsBuilder().UseSqlServer(connectionString).Options);
_getAllTournamentQuery = new GetAllTournamentsQuery(_tournamentsDbContextFactory);
_createTournamentCommand = new CreateTournamentCommand(_tournamentsDbContextFactory);
@@ -49,7 +49,7 @@ namespace Apollon.WPF
}
protected override void OnStartup(StartupEventArgs e)
{
using(TournamentsDbContext context = _tournamentsDbContextFactory.Create())
using(ApplicationDbContext context = _tournamentsDbContextFactory.Create())
{
context.Database.Migrate();
}