Ejemplo n.º 1
0
        public static GetDeckResponse FromDeckEntity(Deck deck)
        {
            var deckResponse = new GetDeckResponse
            {
                DeckId        = deck.DeckId
                , Title       = deck.Title
                , Description = deck.Description

                , CreatedAt = deck.CreatedAt
                , UpdatedAt = deck.UpdatedAt

                , Cards = deck.CardDecks.Select(cd => GetCardResponse.FromCardEntity(cd.Card)).ToList()
            };

            return(deckResponse);
        }
Ejemplo n.º 2
0
 public static IList <GetDeckResponse> FromDeckEntity(List <Deck> decks) => decks.Select(d => GetDeckResponse.FromDeckEntity(d)).ToList();