public long Add(TestSuite testSuite) { try { return(__repository.Add(testSuite)); } catch (Exception) { throw; } }
public async Task <IActionResult> CreateTestSuite([FromBody] TestSuiteResource resource) { var testSuite = _mapper.Map <TestSuiteResource, TestSuite>(resource); _repository.Add(testSuite); await _unitOfWork.CompleteAsync(); var result = _mapper.Map <TestSuite, TestSuiteResource>(testSuite); return(Ok(result)); }