public void Post([FromBody] TestDataVM testData) { try { var data = _mapper.Map <TestData>(testData); _testDataRepo.CreateTestData(data); } catch (Exception ex) { _logger.LogError($"Source: {ex.Source}, StackTrace: {ex.StackTrace} , Message: {ex.Message}"); } }
public void Post([FromBody] TestDataVM testData) { try { var iteration = GetNextIteration(testData.TCID); testData.Iterations = iteration; if (iteration == 0) { PopulateParamsValues(testData); } var data = _mapper.Map <TestData>(testData); _testDataRepo.CreateTestData(data); } catch (Exception ex) { _logger.LogError($"Source: {ex.Source}, StackTrace: {ex.StackTrace} , Message: {ex.Message}"); } }