public void HandleEvent(Event <object> serverSideEvent)
        {
            if (serverSideEvent.IsHealthCheck())
            {
                PostHealthCheckResponse(serverSideEvent);
            }
            else
            {
                if (_statusService.VerifyEvent(serverSideEvent).Status == Status.ADAPTER_ACCEPTED)
                {
                    var action =
                        (ElevActions)Enum.Parse(typeof(ElevActions), serverSideEvent.Action, ignoreCase: true);
                    var responseEvent = serverSideEvent;

                    responseEvent.Status = Status.ADAPTER_RESPONSE;

                    switch (action)
                    {
                    case ElevActions.GET_ALL_BASISGRUPPE:
                        _elevService.GetAllBasisgruppe(serverSideEvent);
                        break;

                    case ElevActions.GET_ALL_ELEV:
                        _elevService.GetAllElev(serverSideEvent);
                        break;

                    case ElevActions.GET_ALL_ELEVFORHOLD:
                        _elevService.GetAllElevforhold(serverSideEvent);
                        break;

                    case ElevActions.GET_ALL_KONTAKTLARERGRUPPE:
                        _elevService.GetAllKontaktlarergruppe(serverSideEvent);
                        break;

                    case ElevActions.GET_ALL_SKOLERESSURS:
                    case ElevActions.GET_ALL_UNDERVISNINGSFORHOLD:
                    case ElevActions.GET_ALL_MEDLEMSKAP:
                        responseEvent.Status         = Status.ADAPTER_REJECTED;
                        responseEvent.ResponseStatus = ResponseStatus.REJECTED;
                        responseEvent.Message        = $"Unsupported action: {action}";
                        break;

                    default:
                        var message = $"Unhandled action: {action}";
                        _logger.LogError(message);
                        throw new Exception(message);
                    }

                    _logger.LogInformation("POST EventResponse");
                    _httpService.Post(_appSettings.ResponseEndpoint, responseEvent);
                }
            }
        }
        public void HandleEvent(Event <object> serverSideEvent)
        {
            if (serverSideEvent.IsHealthCheck())
            {
                PostHealthCheckResponse(serverSideEvent);
            }
            else
            {
                if (_statusService.VerifyEvent(serverSideEvent).Status == Status.ADAPTER_ACCEPTED)
                {
                    var action =
                        (TilgangerActions)Enum.Parse(typeof(TilgangerActions), serverSideEvent.Action, ignoreCase: true);
                    var responseEvent = serverSideEvent;

                    switch (action)
                    {
                    case TilgangerActions.GET_ALL_IDENTITET:
                        _tilgangerService.GetAllIdentiteter(serverSideEvent);
                        break;

                    case TilgangerActions.GET_ALL_RETTIGHET:
                        _tilgangerService.GetAllRettigheter(serverSideEvent);
                        break;

                    default:
                        var message = $"Unhandled action: {action}";
                        _logger.LogError(message);
                        throw new Exception(message);
                    }

                    responseEvent.Status = Status.ADAPTER_RESPONSE;
                    _logger.LogInformation("POST EventResponse");
                    _httpService.Post(_appSettings.ResponseEndpoint, responseEvent);
                }
            }
        }