예제 #1
0
        private async Task RestoreCardsInDb()
        {
            List <Card> cardsInDb = await _cardRepository.GetAll();

            if (cardsInDb.Count != Constant.DeckSize)
            {
                await _cardRepository.DeleteAll();

                List <Card> cards = GenerateCards();
                await _cardRepository.Add(cards);
            }
        }