public virtual IActionResult AffiliatedOrderListGrid(AffiliatedOrderSearchModel searchModel) { if (!_permissionService.Authorize(StandardPermissionProvider.ManageAffiliates)) { return(AccessDeniedKendoGridJson()); } //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.PrepareAffiliatedOrderListModel(searchModel, affiliate); return(Json(model)); }