public async Task <Result <bool> > Handle(DeleteBikeCommand request, CancellationToken cancellationToken) { var result = await _bikeService.DeleteBikeAsync(request.Id); result.IfSucc(s => { var message = new BikeEventMessage() { MessageType = nameof(BikeResponse), Method = ApiMethod.DELETE.ToString(), Message = new BikeResponse() { Id = request.Id } }; _client.PublishEvent(message); }); return(result); }