public async Task <IActionResult> ExecuteAsync(int carId, JsonPatchDocument <CarSm> patch, CancellationToken cancellationToken)
    {
        ICommandResult <Car> result = await _mediator
                                      .Send(new UpdateCarCommand(carId, patch), cancellationToken);

        switch (result.Status)
        {
        case CommandStatus.Unknown:
        default:
            throw new ArgumentOutOfRangeException(nameof(result.Status), result.Status, null);

        case CommandStatus.ModelInvalid:
            return(new BadRequestObjectResult(new Failure(_runtimeCtx.GetCorrelationId(), result.ErrorMessages)));

        case CommandStatus.NotFound:
            return(new NotFoundResult());

        case CommandStatus.Ok:
            CarVm carViewModel = _carToCarVmMapper.Map(result.Data);
            return(new OkObjectResult(carViewModel));
        }
    }
 public async Task SomethingHappenedHandledV1Async(string value, CancellationToken cancellationToken)
 {
     await _publishEndpoint
     .Publish <ISomethingHappenedHandledV1>(new SomethingHappenedHandledMessageV1(_runtimeCtx.GetCorrelationId(), value), cancellationToken);
 }