public void Insert(string hash, CollectionDirection direction, Card card) { var deck = repository.GetDeck(hash); cardsHelper.Insert(direction, deck.Cards, card); repository.Update(deck); }
public void Insert(string hash, string pileHash, CollectionDirection direction, Card card) { var deck = _deckRepository.GetDeck(hash); var pile = deck.Piles.FirstOrDefault(x => x.Hash == pileHash); _cardsHelper.Insert(direction, pile.Cards, card); _deckRepository.Update(deck); }