コード例 #1
0
 public long Add(TestSuite testSuite)
 {
     try
     {
         return(__repository.Add(testSuite));
     }
     catch (Exception)
     {
         throw;
     }
 }
コード例 #2
0
        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));
        }