public virtual IActionResult AffiliatedCustomerList(AffiliatedCustomerSearchModel searchModel)
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageAffiliates))
            {
                return(AccessDeniedDataTablesJson());
            }

            //try to get an affiliate with the specified id
            var affiliate = _affiliateService.GetAffiliateById(searchModel.AffliateId)
                            ?? throw new ArgumentException("No affiliate found with the specified id");

            //prepare model
            var model = _affiliateModelFactory.PrepareAffiliatedCustomerListModel(searchModel, affiliate);

            return(Json(model));
        }