/// <summary> /// Prepare store search model /// </summary> /// <param name="searchModel">Store search model</param> /// <returns>Store search model</returns> public virtual StoreSearchModel PrepareStoreSearchModel(StoreSearchModel searchModel) { if (searchModel == null) { throw new ArgumentNullException(nameof(searchModel)); } //prepare page parameters searchModel.SetGridPageSize(); return(searchModel); }
/// <summary> /// Prepare store search model /// </summary> /// <param name="searchModel">Store search model</param> /// <returns> /// A task that represents the asynchronous operation /// The task result contains the store search model /// </returns> public virtual Task <StoreSearchModel> PrepareStoreSearchModelAsync(StoreSearchModel searchModel) { if (searchModel == null) { throw new ArgumentNullException(nameof(searchModel)); } //prepare page parameters searchModel.SetGridPageSize(); return(Task.FromResult(searchModel)); }
public async Task <StoreSearchModel> PrepareStoreSearchModel(StoreSearchModel searchModel) { if (searchModel == null) { throw new ArgumentNullException(nameof(searchModel)); } await _baseModelFactory.PrepareStoreAreaCodes(searchModel.AvailableAreaCodes); await _baseModelFactory.PrepareStoreCities(searchModel.AvailableCities); await _baseModelFactory.PrepareStoreStates(searchModel.AvailableStates); searchModel.SetGridPageSize(); return(searchModel); }