public async Task UpdateAsync(string solutionId, Action <SolutionSupplier> updateAction,
                                      CancellationToken cancellationToken)
        {
            var supplier =
                await _supplierReader.BySolutionIdAsync(solutionId, cancellationToken).ConfigureAwait(false);

            updateAction(supplier);

            await solutionSupplierUpdater.UpdateBySolutionId(solutionId, supplier, cancellationToken).ConfigureAwait(false);
        }
Beispiel #2
0
 public async Task <ISolutionSupplier> Handle(GetSupplierBySolutionIdQuery request,
                                              CancellationToken cancellationToken) =>
 _mapper.Map <ISolutionSupplier>(await _reader.BySolutionIdAsync(request.SolutionId, cancellationToken)
                                 .ConfigureAwait(false));
Beispiel #3
0
 public async Task <ISolutionSupplier> Handle(
     GetSupplierBySolutionIdQuery request,
     CancellationToken cancellationToken)
 {
     return(mapper.Map <ISolutionSupplier>(await reader.BySolutionIdAsync(request.SolutionId, cancellationToken)));
 }