Exemplo n.º 1
0
        public IActionResult Index()
        {
            TempData["active"] = "ikon";
            var user = _appUserService.FindByName(User.Identity.Name);

            return(View(_mapper.Map <List <SocialMediaIconListDto> >(_socialMediaIconService.GetByUserId(user.Id))));
        }
        public override void Process(TagHelperContext context, TagHelperOutput output)
        {
            var    icons = _socialMediaIconService.GetByUserId(AppUserId);
            string data  = $"<div class='social - icons'>";

            foreach (var item in icons)
            {
                data += $@"<a class='social-icon pr-2' href='{item.Link}'><i class='{item.Icon}'></i></a>";
            }
            data += "</div>";
            output.Content.SetHtmlContent(data);
        }