public async Task Handle(VehicleStatusRecievedIntegrationEvent @event)
 {
     try
     {
         await _uow.UpdateVehicleStatus(@event.VIN, @event.LastPing);
     }
     catch (Exception ex)
     {
         _logger.LogCritical(ex.Message);
         throw ex;
     }
 }
        public IActionResult UpdateVehicleStatus(string vin)
        {
            try
            {
                // Publish integration event to the event bus
                // (RabbitMQ or a service bus underneath)
                DateTime lastPing = DateTime.Now;
                _uow.UpdateVehicleStatus(vin, lastPing);

                return(Ok());
            }
            catch (Exception ex)
            {
                _logger.LogCritical(ex.Message);
                return(StatusCode(500, new Exception("can't process your request currently. Please try again later.")));
            }
        }