public async Task <string> CreateAsync(ResultDto resultDto, CancellationToken cancellationToken) { if (resultDto == null) { throw new ArgumentNullException(nameof(resultDto)); } resultDto.TimeStamp = DateTime.UtcNow; var cpuId = await AssignCpu(resultDto.System.Cpu, cancellationToken); var topologyId = await AssignTopology(cpuId, resultDto.System.Topology, cancellationToken); return(await _resultsRepository.CreateAsync( resultDto.ToModel(_idProvider.GetForResult(resultDto), cpuId, topologyId), cancellationToken)); }