internal override void Apply <TConfigRequest>(CrudRequestConfig <TConfigRequest> config)
        {
            if (_optionsConfig != null)
            {
                var options = new CrudRequestOptionsConfig();
                _optionsConfig(options);
                config.SetOptions(options);
            }

            config.AddRequestHooks(RequestHooks);

            config.AddResultHooks(ResultHooks);

            ApplyErrorConfig(config);

            foreach (var builder in _requestEntityBuilders.Values)
            {
                builder.Build(config);
            }
        }
        private void ApplyErrorConfig <TPerspective>(CrudRequestConfig <TPerspective> config)
        {
            var errorConfig = new CrudRequestErrorConfig();

            _errorConfig?.Invoke(errorConfig);

            if (errorConfig.FailedToFindInGetIsError.HasValue)
            {
                config.ErrorConfig.FailedToFindInGetIsError = errorConfig.FailedToFindInGetIsError.Value;
            }

            if (errorConfig.FailedToFindInGetAllIsError.HasValue)
            {
                config.ErrorConfig.FailedToFindInGetAllIsError = errorConfig.FailedToFindInGetAllIsError.Value;
            }

            if (errorConfig.FailedToFindInFindIsError.HasValue)
            {
                config.ErrorConfig.FailedToFindInFindIsError = errorConfig.FailedToFindInFindIsError.Value;
            }

            if (errorConfig.FailedToFindInUpdateIsError.HasValue)
            {
                config.ErrorConfig.FailedToFindInUpdateIsError = errorConfig.FailedToFindInUpdateIsError.Value;
            }

            if (errorConfig.FailedToFindInDeleteIsError.HasValue)
            {
                config.ErrorConfig.FailedToFindInDeleteIsError = errorConfig.FailedToFindInDeleteIsError.Value;
            }

            if (errorConfig.ErrorHandlerFactory != null)
            {
                config.ErrorConfig.SetErrorHandler(errorConfig.ErrorHandlerFactory);
            }
        }
 internal abstract void Apply <TRequestConfig>(CrudRequestConfig <TRequestConfig> config);
 internal override void Apply <TConfigRequest>(CrudRequestConfig <TConfigRequest> config)
 {
     config.AddRequestHooks(RequestHooks);
     config.AddResultHooks(ResultHooks);
 }