public IActionResult Add(SocialMediaIconAddDto model)
        {
            TempData["active"] = "ikon";
            if (ModelState.IsValid)
            {
                var user = _appUserService.FindByName(User.Identity.Name);
                model.AppUserId = user.Id;

                _socialMediaIconService.Insert(_mapper.Map <SocialMediaIcon>(model));
                TempData["message"] = "Ekleme işlemi başarılı";

                return(RedirectToAction(nameof(Index)));
            }
            return(View(model));
        }
 public IActionResult Insert(SocialMediaIconAddDto model)
 {
     if (ModelState.IsValid)
     {
         var user = _appUserService.GetByUserName(User.Identity.Name);
         _socialMediaIconService.Insert(new SocialMediaIcon
         {
             AppUserId = user.Id,
             Icon      = model.Icon,
             Link      = model.Link,
         });
         TempData["message"] = "İşlem başarıyla gerçekleşti";
         return(RedirectToAction("Index"));
     }
     return(View(model));
 }