public IActionResult DetectionError(DrawerDetectionDto drawerDetectionDto) { var drawerDetection = _mapper.Map <DrawerDetection>(drawerDetectionDto); _drawerDetectionService.InsertDrawerDetection(drawerDetection); drawerDetectionDto = _mapper.Map <DrawerDetectionDto>(drawerDetection); var response = new ApiResponse <DrawerDetectionDto>(drawerDetectionDto); return(Ok(response)); }
public IActionResult Put(int id, DrawerDetectionDto drawerDetectionDto) { var drawerDetection = _mapper.Map <DrawerDetection>(drawerDetectionDto); drawerDetection.Id = id; //Debug.WriteLine("run controller"); var result = _drawerDetectionService.UpdateDrawerDetection(drawerDetection); var response = new ApiResponse <bool>(result); return(Ok(response)); }