예제 #1
0
        public IActionResult Put(int id, DrawerDto drawerDto)
        {
            var drawer = _mapper.Map <Drawer>(drawerDto);

            drawer.Id = id;
            var result   = _drawerService.UpdateDrawer(drawer);
            var response = new ApiResponse <bool>(result);

            return(Ok(response));
        }
예제 #2
0
        public IActionResult Drawer(DrawerDto drawerDto)
        {
            var post = _mapper.Map <Drawer>(drawerDto);

            _drawerService.InsertDrawer(post);
            drawerDto = _mapper.Map <DrawerDto>(post);
            var response = new ApiResponse <DrawerDto>(drawerDto);

            return(Ok(response));
        }