/// <summary> /// Prepare customer reports search model /// </summary> /// <param name="searchModel">Customer reports search model</param> /// <returns>Customer reports search model</returns> public virtual CustomerReportsSearchModel PrepareCustomerReportsSearchModel(CustomerReportsSearchModel searchModel) { if (searchModel == null) { throw new ArgumentNullException(nameof(searchModel)); } //prepare nested search models PrepareRegisteredCustomersReportSearchModel(searchModel.RegisteredCustomers); return(searchModel); }
/// <summary> /// Prepare customer reports search model /// </summary> /// <param name="searchModel">Customer reports search model</param> /// <returns>Customer reports search model</returns> public virtual async Task <CustomerReportsSearchModel> PrepareCustomerReportsSearchModelAsync(CustomerReportsSearchModel searchModel) { if (searchModel == null) { throw new ArgumentNullException(nameof(searchModel)); } //prepare nested search models await PrepareBestCustomersReportByOrderTotalSearchModelAsync(searchModel.BestCustomersByOrderTotal); await PrepareBestCustomersReportSearchModelAsync(searchModel.BestCustomersByNumberOfOrders); await PrepareRegisteredCustomersReportSearchModelAsync(searchModel.RegisteredCustomers); return(searchModel); }