public async Task CopyTestInput(Guid testId, CopyTestInputBindingModel model) { var test = _testsRepository.Read <TestReadModel>().Single(t => t.Id == testId); var sourceTest = _testsRepository.Read <TestReadModel>().Single(t => t.Id == model.SourceTestId); await _testsRepository.UpdateAsync(t => t.Id == testId, t => { t.HasEmptyInput = sourceTest.HasEmptyInput; t.Input = sourceTest.Input; }); }
public async Task CopyTestInputAsync([FromRoute] Guid testId, [FromBody] CopyTestInputBindingModel model) { await _testsService.CopyTestInput(testId, model); }