public async Task DeleteAsync(string userId, string projectId) { var partitionKey = ProjectExpertEntity.GeneratePartitionKey(projectId); var rowKey = ProjectExpertEntity.GenerateRowKey(userId); await _projectExpertsTableStorage.DeleteIfExistAsync(partitionKey, rowKey); }
public async Task <IProjectExpertData> GetAsync(string projectId, string participantId) { var partitionKey = ProjectExpertEntity.GeneratePartitionKey(projectId); var rowKey = ProjectExpertEntity.GenerateRowKey(participantId); return(await _projectExpertsTableStorage.GetDataAsync(partitionKey, rowKey)); }
public Task UpdateAsync(IProjectExpertData projectExpertData) { var partitionKey = ProjectExpertEntity.GeneratePartitionKey(projectExpertData.ProjectId); var rowKey = ProjectExpertEntity.GenerateRowKey(projectExpertData.UserId); return(_projectExpertsTableStorage.ReplaceAsync(partitionKey, rowKey, itm => { itm.Update(projectExpertData); return itm; })); }