private async Task <bool> HandleCommand(string calendarId, MaintenanceJobPlanned newEvent)
        {
            WorkshopCalendarEvent calendarEvent = new WorkshopCalendarEvent()
            {
                Id                   = newEvent.JobId,
                EventDate            = calendarId,
                CustomerId           = newEvent.CustomerInfo.Id,
                VehicleLicenseNumber = newEvent.VehicleInfo.LicenseNumber,
                Description          = newEvent.Description,
                Note                 = newEvent.Description,
                PlannedEndDateTime   = newEvent.StartTime,
                PlannedStartDateTime = newEvent.EndTime,
                ActualStartDateTime  = new DateTime(),
                ActualEndDateTime    = new DateTime(),
                MessageType          = newEvent.MessageType
            };

            try
            {
                await _context.WorkshopCalendarEvents.InsertOneAsync(calendarEvent);

                return(true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        private async Task <bool> HandleCommand(string calendarId, MaintenanceJobFinished newEvent)
        {
            WorkshopCalendarEvent calendarEvent = new WorkshopCalendarEvent()
            {
                EventDate            = calendarId,
                PlannedEndDateTime   = newEvent.StartTime,
                PlannedStartDateTime = newEvent.EndTime,
                MessageType          = newEvent.MessageType
            };

            try
            {
                ReplaceOneResult actionResult = await _context.WorkshopCalendarEvents.ReplaceOneAsync(e => e.Id == newEvent.JobId && e.EventDate == calendarId,
                                                                                                      calendarEvent
                                                                                                      , new ReplaceOptions { IsUpsert = true });

                return(actionResult.IsAcknowledged &&
                       actionResult.ModifiedCount > 0);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }