public async Task <ICommandResult> ExecuteAsync(AddBatchTestResultCommand command)
        {
            var testResults = new List <TestResult>(command.CreateTestResultCommands.Count);

            foreach (var createTestResultCommand in command.CreateTestResultCommands)
            {
                var testResult = await CreateTestResultAsync(createTestResultCommand);

                testResults.Add(testResult);
            }

            await _testResultRepository.AddRange(testResults);

            return(new CommandResult(true));
        }
 public async Task AddTestResults(IEnumerable <TestResult> testResults)
 {
     var entities = _mapper.Map <IList <Data.Models.TestResult> >(testResults);
     await _testResultRepository.AddRange(entities);
 }