/// <summary> /// Prepare predefined product attribute value search model /// </summary> /// <param name="searchModel">Predefined product attribute value search model</param> /// <param name="productAttribute">Product attribute</param> /// <returns>Predefined product attribute value search model</returns> protected virtual PredefinedProductAttributeValueSearchModel PreparePredefinedProductAttributeValueSearchModel( PredefinedProductAttributeValueSearchModel searchModel, ProductAttribute productAttribute) { if (searchModel == null) { throw new ArgumentNullException(nameof(searchModel)); } if (productAttribute == null) { throw new ArgumentNullException(nameof(productAttribute)); } searchModel.ProductAttributeId = productAttribute.Id; //prepare page parameters searchModel.SetGridPageSize(); return(searchModel); }