Ejemplo n.º 1
0
        public IActionResult RemoveProduct([FromBody] CreateAndEditProduct req)
        {
            var res = new SingleRsp();

            res = _svc.RemoveProductByModel(req);
            return(Ok(res));
        }
Ejemplo n.º 2
0
        public IActionResult EditProduct([FromBody] CreateAndEditProduct req)
        {
            var res = new SingleRsp();

            res = _svc.UpdateProduct(req);
            return(Ok(res));
        }
Ejemplo n.º 3
0
        public SingleRsp RemoveProductByModel(CreateAndEditProduct req)
        {
            Product pro = new Product();

            pro.Id               = req.Id;
            pro.CatelogId        = req.CatelogId;
            pro.Description      = req.Description;
            pro.Price            = req.Price;
            pro.Productcontent   = req.Productcontent;
            pro.ProductImgLink   = req.ProductImgLink;
            pro.Productname      = req.Productname;
            pro.ProductInventory = req.ProductInventory;
            return(_rep.RemoveProduct(pro));
        }