ready for database
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
using Apollon.WPF.Models;
|
||||
using Apollon.Domain.Commands;
|
||||
using Apollon.Domain.Models;
|
||||
using Apollon.Domain.Queries;
|
||||
using Apollon.EntityFramework;
|
||||
using Apollon.EntityFramework.Commands;
|
||||
using Apollon.EntityFramework.Queries;
|
||||
using Apollon.WPF.Stores;
|
||||
using Apollon.WPF.ViewModels;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
@@ -17,14 +23,27 @@ namespace Apollon.WPF
|
||||
public partial class App : Application
|
||||
{
|
||||
private readonly ModalNavigationStore _modalNavigationStore;
|
||||
private readonly TournamentsDBContextFactory _tournamentsDBContextFactory;
|
||||
private readonly IGetAllTournamentsQuery _getAllTournamentQuery;
|
||||
private readonly ICreateTournamentCommand _createTournamentCommand;
|
||||
private readonly IUpdateTournamentCommand _updateTournamentCommand;
|
||||
private readonly IDeleteTournamentCommand _deleteTournamentCommand;
|
||||
private readonly TournamentsStore _tournamentStore;
|
||||
private readonly SelectedTournamentsStore _selectedTournamentStore;
|
||||
|
||||
|
||||
public App()
|
||||
{
|
||||
string connectionString = "Server=NATHALIE-PC\NATLINUXDB;Database=OfficeOrganizer;Trusted_Connection=True;MultipleActiveResultSets=true\";
|
||||
|
||||
_modalNavigationStore = new ModalNavigationStore();
|
||||
_tournamentStore = new TournamentsStore();
|
||||
_tournamentsDBContextFactory = new TournamentsDBContextFactory(
|
||||
new DbContextOptionsBuilder().UseSqlServer(connectionString).Options);
|
||||
_getAllTournamentQuery = new GetAllTournamentsQuery();
|
||||
_createTournamentCommand = new CreateTournamentCommand();
|
||||
_updateTournamentCommand = new UpdateTournamentCommand();
|
||||
_deleteTournamentCommand = new DeleteTournamentCommand();
|
||||
_tournamentStore = new TournamentsStore(_getAllTournamentQuery, _createTournamentCommand, _updateTournamentCommand, _deleteTournamentCommand);
|
||||
_selectedTournamentStore = new SelectedTournamentsStore(_tournamentStore);
|
||||
}
|
||||
protected override void OnStartup(StartupEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user