using SewerStammGen.Shared.Contracts; using SewerStammGen.WPF.Interface.Navigator; using SewerStammGen.WPF.ViewModel.State; using Shared.Contracts; using Shared.Domain; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SewerStammGen.WPF.Commands { class SchachtAddCommand : AsyncCommandBase { private readonly IActualState actualState; private readonly IRenavigator renavigator; private readonly IDataService projektService; private readonly ISchachtService schachtService; public SchachtAddCommand(IDataService projektService, IActualState actualState, IRenavigator renavigator, ISchachtService schachtService) { this.actualState = actualState; this.renavigator = renavigator; this.projektService = projektService; this.schachtService = schachtService; } public override async Task ExecuteAsync(object? parameter) { Projekt aktuelleProjekt = await projektService.Get(actualState.ProjektID); Schacht schacht = await schachtService.CreateSchacht(aktuelleProjekt); } } }