コード例 #1
0
        public async Task DeleteAsync(string userId, string projectId)
        {
            var partitionKey = ProjectExpertEntity.GeneratePartitionKey(projectId);
            var rowKey       = ProjectExpertEntity.GenerateRowKey(userId);

            await _projectExpertsTableStorage.DeleteIfExistAsync(partitionKey, rowKey);
        }
コード例 #2
0
        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));
        }
コード例 #3
0
        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;
            }));
        }
コード例 #4
0
        public static ProjectExpertEntity Create(IProjectExpertData src)
        {
            var result = new ProjectExpertEntity
            {
                PartitionKey   = GeneratePartitionKey(src.ProjectId),
                RowKey         = GenerateRowKey(src.UserId),
                ProjectId      = src.ProjectId,
                UserId         = src.UserId,
                UserIdentifier = src.UserIdentifier,
                StreamsId      = src.StreamsId,
                FullName       = src.FullName,
                Description    = src.Description,
                Priority       = src.Priority
            };

            return(result);
        }
コード例 #5
0
 public async Task SaveAsync(IProjectExpertData projectExpertData)
 {
     var newEntity = ProjectExpertEntity.Create(projectExpertData);
     await _projectExpertsTableStorage.InsertAsync(newEntity);
 }
コード例 #6
0
        public async Task <IEnumerable <IProjectExpertData> > GetProjectExpertsAsync(string projectId)
        {
            var partitionKey = ProjectExpertEntity.GeneratePartitionKey(projectId);

            return(await _projectExpertsTableStorage.GetDataAsync(partitionKey));
        }