/// <summary> /// Prepare manufacturer product search model /// </summary> /// <param name="searchModel">Manufacturer product search model</param> /// <param name="manufacturer">Manufacturer</param> /// <returns>Manufacturer product search model</returns> protected virtual ManufacturerProductSearchModel PrepareManufacturerProductSearchModel(ManufacturerProductSearchModel searchModel, Manufacturer manufacturer) { if (searchModel == null) { throw new ArgumentNullException(nameof(searchModel)); } if (manufacturer == null) { throw new ArgumentNullException(nameof(manufacturer)); } searchModel.ManufacturerId = manufacturer.Id; //prepare page parameters searchModel.SetGridPageSize(); return(searchModel); }