Beispiel #1
0
        public async Task <IActionResult> FinishPickingAsync(
            [FromRoute] Guid rentalId,
            [FromBody] FinishPickingCommand finishPickingCommand,
            CancellationToken cancellationToken)
        {
            finishPickingCommand.RentalId = rentalId;

            await _rentalHandler.FinishPickingAsync(finishPickingCommand, cancellationToken);

            return(Ok());
        }
Beispiel #2
0
        public async Task FinishPickingAsync(
            FinishPickingCommand finishPickingCommand,
            CancellationToken cancellationToken)
        {
            var finishPicking = await _rentalRepository.GetAsync(finishPickingCommand.RentalId, cancellationToken);

            finishPicking.FinishPicking();

            _rentalRepository.Update(finishPicking);
            await _rentalRepository.SaveAsync(cancellationToken);
        }