public async Task ExecuteAsync(Controller controller, PageActionRoutingState state)
        {
            var settings = await _queryExecutor.ExecuteAsync(new GetSettingsQuery <InternalSettings>());

            if (!settings.IsSetup)
            {
                var setup = _setupPageActionFactory.GetSetupPageAction(controller);
                if (setup == null)
                {
                    throw new Exception("ISetupPageActionFactory returned no action.");
                }
                state.Result = setup;
            }
        }
        public Task ExecuteAsync(Controller controller, PageActionRoutingState state)
        {
            var internalSettings = _queryExecutor.Get <InternalSettings>();

            if (!internalSettings.IsSetup)
            {
                var setup = _setupPageActionFactory.GetSetupPageAction(controller);
                if (setup == null)
                {
                    throw new ApplicationException("ISetupPageActionFactory returned no action.");
                }
                state.Result = setup;
            }

            return(Task.FromResult(true));
        }