Ejemplo n.º 1
0
		public ActionResult Details(string id)
		{
			var searchService = new CardSearchService(MvcApplication.CardCache);

			var model = searchService.FindById(id);

			return View(model);
		}
Ejemplo n.º 2
0
        public ActionResult Index(string playerClass = null, string q = null)
		{
			CardSearchService searchService = new CardSearchService(MvcApplication.CardCache);
            IEnumerable<CardModel> cards = searchService.Search(playerClass, q);
            IEnumerable<string> playerClasses = searchService.GetPlayerClasses();

            CardsViewModel cardsViewModel = new CardsViewModel()
            {
                Cards = cards,
                PlayerClasses = playerClasses
            };


			return View(cardsViewModel);
		}
Ejemplo n.º 3
0
		public ActionResult Index()
		{
			var searchService = new CardSearchService(MvcApplication.CardCache);
			var heroes = searchService.GetHeroes();
			return View(heroes);
		}