Example #1
0
 private static void PersistToDb(TweetDataContext dbContext, string statusId, string userName, string text)
 {
     var tweetUrl = string.Format("https://twitter.com/{0}/status/{1}", userName, statusId);
     var data = new TweetData
     {
         StatusId = statusId,
         UserName = userName,
         Text = text,
         TweetUrl = tweetUrl
     };
     dbContext.TweetDatas.Add(data);
     dbContext.SaveChanges();
 }
Example #2
0
        private static void PersistToDb(TweetDataContext dbContext, string statusId, string userName, string text)
        {
            var tweetUrl = string.Format("https://twitter.com/{0}/status/{1}", userName, statusId);
            var data     = new TweetData
            {
                StatusId = statusId,
                UserName = userName,
                Text     = text,
                TweetUrl = tweetUrl
            };

            dbContext.TweetDatas.Add(data);
            dbContext.SaveChanges();
        }