Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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;
            }));
        }