private List <Tweet> GetTweetsByNotId(int id) { using (var db = new MatcherDb()) { IQueryable <Tweet> potentialtweets = db.Tweets.Where(w => w.UserID != id).Distinct(); return(potentialtweets.ToList()); } }
private List <string> GetUserTweets(int id) { using (var db = new MatcherDb()) { IQueryable <string> usertweets = db.Tweets.Where(w => w.UserID == id).Select(tweet => tweet.VideoLabel); return(usertweets.ToList()); } }
private void GetValue(int id, List <double> weight, Tweet yourtweet) { using (var db = new MatcherDb()) { TMatching matcHH = new TMatching(); matcHH.Weight = (weight.Sum()); matcHH.TweetID1 = id; matcHH.TweetID2 = (int)yourtweet.UserID; db.TMatchings.Add(matcHH); db.SaveChanges(); } }