public IHttpActionResult GetPriceLists() { var priceLists = _pricingService.GetPriceLists(); var result = priceLists.Select(x => x.ToWebModel()).ToArray(); return(Ok(result)); }
private BackupObject GetBackupObject() { return(new BackupObject { Pricelists = _pricingService.GetPriceLists().Select(x => x.Id).Select(x => _pricingService.GetPricelistById(x)).ToArray() }); }
private BackupObject GetBackupObject(Action <ExportImportProgressInfo> progressCallback) { var allPricelistIds = _pricingService.GetPriceLists().Select(x => x.Id); var progressInfo = new ExportImportProgressInfo { Description = String.Format("{0} price lists loading...", allPricelistIds.Count()) }; progressCallback(progressInfo); return(new BackupObject { Pricelists = allPricelistIds.Select(x => _pricingService.GetPricelistById(x)).ToList() }); }