public virtual async Task <IActionResult> AffiliatedCustomerList(AffiliatedCustomerSearchModel searchModel)
        {
            if (!await _permissionService.AuthorizeAsync(StandardPermissionProvider.ManageAffiliates))
            {
                return(await AccessDeniedDataTablesJson());
            }

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

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

            return(Json(model));
        }