Beispiel #1
0
        public bool GetIfVideoExists(long tweetId, out TwitterVideo video)
        {
            bool exists = context.TwitterVideos
                          .Any(x => x.ParentTweetId == tweetId);

            video = default;

            if (exists)
            {
                video = context.TwitterVideos
                        .Where(x => x.ParentTweetId == tweetId)
                        .FirstOrDefault();
            }
            return(exists);
        }
Beispiel #2
0
 public async Task CaptureTwitterVideoAndRequestAsync(TwitterVideoRequest request, TwitterVideo twitterVideo)
 {
     context.Add(twitterVideo);
     context.Add(request);
     await context.SaveChangesAsync();
 }