public async Task <IProjectVoteData> GetAsync(string projectId, string user) { var partitionKey = ProjectVoteEntity.GeneratePartitionKey(projectId); var rowKey = ProjectVoteEntity.GenerateRowKey(user); return(await _projectVoteTableStorage.GetDataAsync(partitionKey, rowKey)); }
public Task UpdateAsync(IProjectVoteData projectVoteData) { var partitionKey = ProjectVoteEntity.GeneratePartitionKey(projectVoteData.ProjectId); var rowKey = ProjectVoteEntity.GenerateRowKey(projectVoteData.VoterUserId); return(_projectVoteTableStorage.ReplaceAsync(partitionKey, rowKey, itm => { itm.Update(projectVoteData); return itm; })); }