示例#1
0
        public async Task <string> RegisterAsync(ITweetCash tweetCash)
        {
            var newItem = TweetCash.Create(tweetCash);
            await _tableStorage.InsertAsync(newItem);

            return(newItem.TweetId);
        }
 public static TweetsResponseModel Create(ITweetCash src)
 {
     return(new TweetsResponseModel
     {
         TweetId = src.TweetId,
         Title = src.Title,
         UserImage = src.UserImage,
         TweetImage = src.TweetImage,
         Date = src.Date.ToUniversalTime(),
         Author = src.Author,
         AccountId = src.AccountId,
         TweetJSON = src.TweetJSON
     });
 }
 public static TweetCash Create(ITweetCash src)
 {
     return(new TweetCash
     {
         PartitionKey = GeneratePartitionKey(src.AccountId),
         RowKey = GenerateRowKey(src.Date, src.TweetId),
         TweetId = src.TweetId,
         Title = src.Title,
         UserImage = src.UserImage,
         TweetImage = src.TweetImage,
         Date = src.Date.ToUniversalTime(),
         Author = src.Author,
         AccountId = src.AccountId,
         TweetJSON = src.TweetJSON
     });
 }
示例#4
0
 public async Task CreateAsync(ITweetCash tweetCash)
 {
     var newItem = TweetCash.Create(tweetCash);
     await _tableStorage.InsertAsync(newItem);
 }