public async Task <IProjectParticipateData> DeleteAsync(string projectId, string userId)
        {
            var partitionKey = ProjectParticipateEntity.GeneratePartitionKey(projectId);
            var rowKey       = ProjectParticipateEntity.GenerateRowKey(userId);

            return(await _projectParticipateTableStorage.DeleteAsync(partitionKey, rowKey));
        }
        public Task UpdateAsync(IProjectParticipateData projectParticipantData)
        {
            var partitionKey = ProjectParticipateEntity.GeneratePartitionKey(projectParticipantData.ProjectId);
            var rowKey       = ProjectParticipateEntity.GenerateRowKey(projectParticipantData.UserId);

            return(_projectParticipateTableStorage.ReplaceAsync(partitionKey, rowKey, itm =>
            {
                itm.Update(projectParticipantData);
                return itm;
            }));
        }
        public static ProjectParticipateEntity Create(IProjectParticipateData src)
        {
            var result = new ProjectParticipateEntity
            {
                PartitionKey = GeneratePartitionKey(src.ProjectId),
                RowKey       = GenerateRowKey(src.UserId),
                ProjectId    = src.ProjectId,
                UserId       = src.UserId,
                FullName     = src.FullName,
                Registered   = src.Registered,
                Result       = src.Result
            };

            return(result);
        }
        public async Task <IEnumerable <IProjectParticipateData> > GetProjectParticipantsAsync(string projectId)
        {
            var partitionKey = ProjectParticipateEntity.GeneratePartitionKey(projectId);

            return(await _projectParticipateTableStorage.GetDataAsync(partitionKey));
        }
 public async Task SaveAsync(IProjectParticipateData projectParticipateData)
 {
     var newEntity = ProjectParticipateEntity.Create(projectParticipateData);
     await _projectParticipateTableStorage.InsertAsync(newEntity);
 }