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)); }
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)); }