public async Task <ActionResult <IEnumerable <DepositDto> > > GetAsync() { var customers = await _customerRepository.GetAsync(); var deposits = (await _depositRepository.GetAsync()).Select(deposit => { var customer = customers.Single(customer => customer.CustomerCID == deposit.CustomerCID); return(deposit.AsDto(customer.CustomerName)); }); return(Ok(deposits)); }