public ActionResult TwitterMessage(TweetViewModel tweetMV)
        {
            SetTempUser(tweetMV.TweetMessageViewModel.userid);

            if (ModelState.IsValid)
            {
                var status = _tcBLayer.SaveTweet(tweetMV.TweetMessageViewModel);
                //bool isExist = false;
                if (status)
                {
                    var res = _tcBLayer.GetTweet(tweetMV.TweetMessageViewModel.userid, tweetMV.TweetMessageViewModel.TweetId);
                    //return PartialView("Tweets", res.TweetsViewModel);
                    return(RedirectToAction("TwitterHome", tweetMV));
                }
            }

            return(View("TwitterHome", tweetMV));
            //return RedirectToAction("TwitterHome");
        }
        public TweetViewModel GetTweet(string userName, int tweetId)
        {
            TweetViewModel tvm = new TweetViewModel();

            tvm.TweetMessageViewModel = new TweetMessageViewModel();

            var Tweets       = TwitterCloneDataAccess.GetTweets(userName);
            var tweetDetails = TwitterCloneDataAccess.GetTweetMessageDetails(userName);

            if (tweetId == 0)
            {
                tvm.TweetMessageViewModel.userid = userName;
            }
            else
            {
                tvm.TweetMessageViewModel = Tweets.Where(x => x.TweetId == tweetId).FirstOrDefault();
            }

            tvm.TweetsViewModel = Tweets;
            tvm.Tweetdetails    = tweetDetails;
            return(tvm);
        }