public IActionResult RemoveProduct([FromBody] CreateAndEditProduct req) { var res = new SingleRsp(); res = _svc.RemoveProductByModel(req); return(Ok(res)); }
public IActionResult EditProduct([FromBody] CreateAndEditProduct req) { var res = new SingleRsp(); res = _svc.UpdateProduct(req); return(Ok(res)); }
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)); }