예제 #1
0
        public async Task DeleteAsync(string projectId, string userId)
        {
            var partitionKey = WinnerEntity.GeneratePartitionKey(projectId);
            var rowKey       = WinnerEntity.GenerateRowKey(userId);

            await _winnersStorage.DeleteAsync(partitionKey, rowKey);
        }
예제 #2
0
        public async Task <IWinnerData> GetAsync(string projectId, string userId)
        {
            var partitionKey = WinnerEntity.GeneratePartitionKey(projectId);
            var rowKey       = WinnerEntity.GenerateRowKey(userId);

            return(await _winnersStorage.GetDataAsync(partitionKey, rowKey));
        }
예제 #3
0
        public Task UpdateAsync(IWinnerData winnerData)
        {
            var partitionKey = WinnerEntity.GeneratePartitionKey(winnerData.ProjectId);
            var rowKey       = WinnerEntity.GenerateRowKey(winnerData.WinnerId);

            return(_winnersStorage.ReplaceAsync(partitionKey, rowKey, itm =>
            {
                itm.Update(winnerData);
                return itm;
            }));
        }