public async Task <Deck> DeckAddAsync(Deck deck) { var dbDeck = await _gateway.DeckAddAsync(deck.ToDown()).ConfigureAwait(false); foreach (var card in deck.Cards) { dbDeck.DeckLinks.Add(await _gateway.DeckLinkAddAsync(dbDeck.Id, card.Id).ConfigureAwait(false)); } return(dbDeck.ToUp()); }