示例#1
0
        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));
        }
示例#2
0
        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));
        }