コード例 #1
0
        public ActionResult Index()
        {
            SEOToolStaticPage SEOTool = _seoToolStaticPageQueryService.FindSEOToolStaticPageByPermalink("b-giftcards");

            if (SEOTool != null)
            {
                ViewBag.FocusKeyword    = SEOTool.FocusKeyword;
                ViewBag.MetaDescription = SEOTool.MetaDescription;
                ViewBag.Title           = SEOTool.SEOTitle;
            }


            var giftCards = _giftCardService.All();

            return(View(new GiftCardsIndex
            {
                Count = giftCards.Count(),
                GiftCards = Mapper.Map <List <GiftCard> >(giftCards)
            }));
        }