public async Task <CalendarEvent> GetByIdAsync(int id, QuerySet query = null)
        {
            var calendarEvent = await _visitDataProvider.GetByIdAsync(id, query);

            if (calendarEvent == null)
            {
                _logger.LogError($"No calendar event found with id {id}");
                throw new EntityNotFoundException();
            }

            if (calendarEvent.MsObjectId != null)
            {
                calendarEvent = await SyncSubjectAndPeriod(calendarEvent);
            }

            return(calendarEvent);
        }