Пример #1
0
 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());
     }
 }
Пример #2
0
 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());
     }
 }
Пример #3
0
 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();
     }
 }