public async Task <IActionResult> UpdateTestCase(long testIssueId, [FromBody] TestIssueResource testIssueResource) { var testIssue = await _repository.Get(testIssueId); if (testIssue == null) { return(NotFound()); } var result = _mapper.Map <TestIssueResource, TestIssue>(testIssueResource, testIssue); _repository.Update(result); await _unitOfWork.CompleteAsync(); return(Ok(result)); }
public async Task <IActionResult> Delete(long testIssueId) { var testIssue = await _repository.Get(testIssueId); if (testIssue == null) { return(NotFound()); } _repository.Remove(testIssue); await _unitOfWork.CompleteAsync(); return(Ok(testIssue)); }