Beispiel #1
0
 public CommentJson(CommentDB le)
 {
     CommentID = le.RowKey;
     Product   = le.PartitionKey;
     Username  = le.Username;
     Comment   = le.Comment;
     DateTime  = le.Timestamp.ToString();
 }
Beispiel #2
0
        private async Task <bool> InsertComment(string _product, string _commentID, string _comment, string _username)
        {
            CommentDB      dbLink          = new CommentDB(_product, _commentID, _comment, _username);
            TableOperation insertOperation = TableOperation.InsertOrMerge(dbLink);

            try
            {
                await commentTable.ExecuteAsync(insertOperation);

                return(true);
            }
            catch (Exception e)
            {
                return(false);
            }
        }