Example #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);
        }
Example #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));
        }
Example #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;
            }));
        }