public IActionResult Search(string username, int id) { if (username != null) { var deger = user.Search(username); if (deger != null && deger.Isdeleted == false) { var sorguTweet = tweet.GetTweetsById(deger.Id); var twcount = sorguTweet.Count(); var fallows = conn.GetFallowing(id); DtoUserProfileTweet UPT = new DtoUserProfileTweet(); UPT.dtoTweets = sorguTweet; UPT.takipedilen = fallows; UPT.TweetCount = twcount; UPT.User = deger; UPT.takipedilen = conn.GetFallowing(deger.Id); UPT.takipci = conn.GetFollowers(deger.Id); return(View(UPT)); } else { return(RedirectToAction("Error")); } } else { return(RedirectToAction("Error")); } }
public IActionResult Search(string aranan) { var result = UserM.Search(aranan); if (result != null) { return(RedirectToAction("ProfilIndex", "Profil", new { id = result.UserId })); } else { return(Redirect("Error")); } }