Files
SewerGenerator/SewerStammGen/Commands/SchachtAddCommand.cs

38 lines
1.2 KiB
C#

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<Projekt> projektService;
private readonly ISchachtService schachtService;
public SchachtAddCommand(IDataService<Projekt> 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);
}
}
}