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 GetbyFallowsTable(int id) { ConnectionMenager conn = new ConnectionMenager(); DtoUserProfileTweet UPT = new DtoUserProfileTweet(); UPT.takipedilen = conn.GetFallowing(id).ToList(); UPT.takipci = conn.GetFollowers(id).ToList(); return(PartialView("_GetFallowsTable", UPT)); }