public async Task <ModelFilterConfiguration> GetFilter() { var filters = _options[FilterConstants.WorkOrder]; var trades = await _scheduleOfRatesGateway.GetTrades(); filters[FilterSectionConstants.Trades] = new List <FilterOption>(trades.Select(t => new FilterOption { Key = t.Code, Description = t.Name })); filters[FilterSectionConstants.Contractors] = await GetContractors(); return(filters); }
public async Task <IEnumerable <SorTradeResponse> > Execute(string propRef) { var sorCodes = await _scheduleOfRatesGateway.GetTrades(propRef); return(sorCodes.Select(c => c.ToResponse())); }