Example #1
0
        public SearchVM SearchCards(string set)
        {
            var vm = new SearchVM();
            var cards = _repo.All<Card>();
            if (!string.IsNullOrEmpty(set))
            {
                cards = cards.Where(x => x.Set == set.ToUpper());
            }

            vm.Cards = cards.OrderBy(x => x.Name);

            return vm;
        }
 public ActionResult Search(string set = "")
 {
     var vm = new SearchVM();
     vm = _service.SearchCards(set);
     return View("Index", vm);
 }