public IActionResult Index(int Id) { UserDto usermodel = JsonConvert.DeserializeObject <UserDto>(HttpContext.Session.GetString("User")); var model = _userServices.GetUserById(Id); var model2 = _tweetServices.GetTweetsById(model.UserId); UserTweetDto userTweetDto = new UserTweetDto(); userTweetDto.userDto = model; userTweetDto.tweetList = model2; userTweetDto.loginUser = usermodel; ViewBag.IsFollow = _followServices.isFollowing(usermodel.UserId, model.UserId); ViewBag.TweetCount = _tweetServices.CountTweet(Id); ViewBag.Follower = _followServices.CountFollower(Id); ViewBag.Following = _followServices.CountFollowing(Id); return(View(userTweetDto)); }