public Task <IReadOnlyList <BalanceModel> > GetLykkeAsync() { IReadOnlyCollection <Balance> balances = _balanceService.GetByExchange(ExchangeNames.Lykke); var model = Mapper.Map <BalanceModel[]>(balances); return(Task.FromResult <IReadOnlyList <BalanceModel> >(model)); }
public Task <IReadOnlyList <BalanceModel> > GetAsync(string exchange = null) { IReadOnlyList <Balance> balances; if (string.IsNullOrEmpty(exchange)) { balances = _balanceService.GetAll(); } else { balances = _balanceService.GetByExchange(exchange); } return(Task.FromResult(Mapper.Map <IReadOnlyList <BalanceModel> >(balances))); }