示例#1
0
        public IActionResult Index()
        {
            DeckofCardsModel cardDeck  = deckofcardsDAL.ConvertJsontoDeckofCardsModel();
            DrawCardsModel   drawCards = deckofcardsDAL.ConvertJsontoDrawCardsModel(cardDeck.deck_id, 5);

            return(View(drawCards));
        }
示例#2
0
        public IActionResult Index()
        {
            // Now let's make use of our CardDAL! We've got a couple useful methods:
            // - One method that gets a full card deck: GetCardDeck()
            // - Another that draws cards: DrawCards(deck to draw from, how many cards)
            // - Notice we decided that the DrawCards method takes two arguments: a deck to draw from, and how many cards

            CardDeckModel  cardDeck  = _cardDal.GetCardDeck();
            DrawCardsModel drawCards = _cardDal.DrawCards(cardDeck.deck_id, 5);

            return(View(drawCards));
        }