public static Tweetdetails GetTweetMessageDetails(string userName) { Tweetdetails tmv = new Tweetdetails(); try { using (var _context = new TwitterCloneDBEntities()) { var tweets = _context.TWEETs.Where(x => x.user_id.Trim().ToUpper() == userName.ToUpper().Trim()); var follows = _context.People.Where(x => x.user_id.Trim().ToUpper() == userName.ToUpper().Trim()).FirstOrDefault(); if (tweets != null) { tmv.TotalTweets = tweets.Count(); } if (follows != null) { tmv.TotalFollowers = follows.People.Count(); tmv.TotalFollowing = follows.Person1.Count(); } } } catch (Exception ex) { } return(tmv); }
public static Tweetdetails GetTweetDetails(string userName) { Tweetdetails td = new Tweetdetails(); try { } catch (Exception ex) { } return(td); }