private async Task SaveCardsAsync(BankScrapper.Models.Card[] cards, Account account) { if (cards?.Any() != true) { return; } foreach (var card in cards) { var cardEntity = _mapper.Map <Card>(card); cardEntity.Account = account; cardEntity.AccountId = account.Id; await _cardsService.AddAsync(cardEntity); } }