public IActionResult DetectionError(DetectionErrorDto detectionErrorDto) { var detectionError = _mapper.Map <DetectionError>(detectionErrorDto); _detectionErrorService.InsertDetectionError(detectionError); detectionErrorDto = _mapper.Map <DetectionErrorDto>(detectionError); var response = new ApiResponse <DetectionErrorDto>(detectionErrorDto); return(Ok(response)); }
public IActionResult Put(int id, DetectionErrorDto detectionErrorDto) { var detectionError = _mapper.Map <DetectionError>(detectionErrorDto); detectionError.Id = id; //Debug.WriteLine("run controller"); var result = _detectionErrorService.UpdateDetectionError(detectionError); var response = new ApiResponse <bool>(result); return(Ok(response)); }