public List <Card> GetAllCards()
        {
            var cards = Connection.Query <Card>($@"SELECT * FROM Cards WHERE [Set] = '{_setData.MostRecentExpansion().First().Code}' AND Number NOT LIKE '%b' ORDER BY ID", transaction: Transaction);

            return(cards.ToList());
        }
        public ActionResult Index()
        {
            var cards = _cardData.GetAllCards();

            cards.ForEach(c =>
            {
                c.src      = "http://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=" + c.ID + "&type=card";
                c.url      = Url.Action("CardDetail", "Cards", new { ID = c.ID });
                c.Hovering = false;
            });

            var vm = new AllCardsHomeModel()
            {
                Title               = _setData.MostRecentExpansion().First().Name,
                AdvancedSearch      = false,
                Search              = true,
                SelectedCard        = 0,
                Sets                = _setData.GetAllSets(),
                AllSets             = _setData.GetAllSets(false),
                SetOperator         = "AND",
                SetList             = new List <SearchList>(),
                AllNames            = null,
                NameOperator        = "AND",
                NameList            = new List <SearchList>(),
                AllTypes            = _cardData.GetAllTypes(),
                TypeOperator        = "AND",
                TypeList            = new List <SearchList>(),
                AllSubTypes         = _cardData.GetAllSubTypes(),
                SubTypeOperator     = "AND",
                SubTypeList         = new List <SearchList>(),
                ManaCostOperator    = "AND",
                ManaCostComparison  = "=",
                ManaCostList        = new List <SearchList>(),
                PowerOperator       = "AND",
                PowerComparison     = "=",
                PowerList           = new List <SearchList>(),
                ToughnessOperator   = "AND",
                ToughnessComparison = "=",
                ToughnessList       = new List <SearchList>(),
                AllRaritys          = _cardData.GetAllRaritys(),
                RarityOperator      = "AND",
                RarityList          = new List <SearchList>(),
                TextOperator        = "AND",
                TextList            = new List <SearchList>(),
                ArtistOperator      = "AND",
                ArtistList          = new List <SearchList>(),

                Colors = new ColorSelector()
                {
                    White     = false,
                    Blue      = false,
                    Black     = false,
                    Red       = false,
                    Green     = false,
                    Colorless = false
                },
                ManaOperator = "OR",
                Cards        = cards,
                Decks        = _deckData.GetMyDecks(User.Identity.Name),
                Loading      = true,
                CardAmounts  = new CardAmounts(),
                Settings     = false,
                ColSize      = "col-md-3"
            };

            return(View(vm));
        }