Exemple #1
0
        public void AddToDeck(WorkspaceCard workspaceCard)
        {
            if (!DeckCards.Any(dc => dc.WorkspaceCardId == workspaceCard.Id))
            {
                var nextId = Id <DeckCard> .GetNextId(DeckCards);

                var deckCard = new DeckCard(nextId, workspaceCard.Id, 1);
                DeckCards.Add(deckCard);
            }
            else
            {
                var deckCard = DeckCards.Find(dc => dc.WorkspaceCardId == workspaceCard.Id);
                //deckCard.Quantity++;
            }
        }