public static ProjectResultVoteEntity Create(IProjectResultVoteData src) { var result = new ProjectResultVoteEntity { RowKey = GenerateRowKey(src.ParticipantId, src.VoterUserId), PartitionKey = GeneratePartitionKey(src.ProjectId), ParticipantId = src.ParticipantId }; return result; }
public static ProjectResultVoteEntity Create(IProjectResultVoteData src) { var result = new ProjectResultVoteEntity { RowKey = GenerateRowKey(src.ParticipantId, src.VoterUserId), VoterUserId = src.VoterUserId, PartitionKey = GeneratePartitionKey(src.ProjectId), ParticipantId = src.ParticipantId, UserAgent = src.UserAgent, Type = src.Type }; return(result); }
public async Task SaveAsync(IProjectResultVoteData projectResultVoteData) { var newEntity = ProjectResultVoteEntity.Create(projectResultVoteData); await _projectResultVoteTableStorage.InsertAsync(newEntity); }