public async Task <ICommentData> GetCommentAsync(string projectId, string commentId) { var partitionKey = CommentEntity.GeneratePartitionKey(projectId); var rowKey = CommentEntity.GenerateRowKey(commentId); return(await _projectCommentsTableStorage.GetDataAsync(partitionKey, rowKey)); }
public async Task DeleteAsync(string projectId, string commentId) { var partitionKey = CommentEntity.GeneratePartitionKey(projectId); var rowKey = CommentEntity.GenerateRowKey(commentId); await _projectCommentsTableStorage.DeleteAsync(partitionKey, rowKey); }
public Task UpdateAsync(ICommentData projectCommentData) { var partitionKey = CommentEntity.GeneratePartitionKey(projectCommentData.ProjectId); var rowKey = CommentEntity.GenerateRowKey(projectCommentData.Id); return(_projectCommentsTableStorage.ReplaceAsync(partitionKey, rowKey, itm => { itm.Update(projectCommentData); return itm; })); }
public async Task <IEnumerable <ICommentData> > GetProjectCommentsAsync(string projectId) { var partitionKey = CommentEntity.GeneratePartitionKey(projectId); return(await _projectCommentsTableStorage.GetDataAsync(partitionKey)); }