Example #1
0
        public IActionResult Detection(DetectionDto detectionDto)
        {
            var detection = _mapper.Map <Detection>(detectionDto);

            _detectionService.InsertDetection(detection);
            detectionDto = _mapper.Map <DetectionDto>(detection);
            var response = new ApiResponse <DetectionDto>(detectionDto);

            return(Ok(response));
        }
Example #2
0
        public IActionResult Put(int id, DetectionDto detectionDto)
        {
            var detection = _mapper.Map <Detection>(detectionDto);

            detection.Id = id;
            //Debug.WriteLine("run controller");
            var result   = _detectionService.UpdateDetection(detection);
            var response = new ApiResponse <bool>(result);

            return(Ok(response));
        }