internal void Update(IProjectResultData src) { Link = src.Link; Score = src.Score; Votes = src.Votes; UserAgent = src.UserAgent; }
internal void Update(IProjectResultData src) { Link = src.Link; Score = src.Score; Votes = src.Votes; UserAgent = src.UserAgent; ParticipantIdentifier = src.ParticipantIdentifier; }
public Task UpdateAsync(IProjectResultData resultData) { var partitionKey = ProjectResultEntity.GeneratePartitionKey(resultData.ProjectId); var rowKey = ProjectResultEntity.GenerateRowKey(resultData.ParticipantId); return(_projectResultInfoTableStorage.ReplaceAsync(partitionKey, rowKey, itm => { itm.Update(resultData); return itm; })); }
public static ProjectResultEntity Create(IProjectResultData src) { var result = new ProjectResultEntity { PartitionKey = GeneratePartitionKey(src.ProjectId), RowKey = GenerateRowKey(src.ParticipantId), ProjectId = src.ProjectId, ParticipantId = src.ParticipantId, ParticipantFullName = src.ParticipantFullName, Link = src.Link, Submitted = src.Submitted, Score = src.Score }; return(result); }
public static WinnerViewModel Create(IProjectResultData result, int winningPlace, double score, double?budget) { return(new WinnerViewModel { ProjectId = result.ProjectId, WinnerId = result.ParticipantId, WinnerIdentifier = result.ParticipantIdentifier, FullName = result.ParticipantFullName, Result = result.Link, Votes = result.Votes, Score = result.Score, Place = winningPlace, Budget = budget, WinningScore = score }); }
public async Task SaveAsync(IProjectResultData resultData) { var newEntity = ProjectResultEntity.Create(resultData); await _projectResultInfoTableStorage.InsertAsync(newEntity); }