示例#1
0
 public IActionResult Delete(Guid id)
 {
     try
     {
         ProductControllerHelperMethods.ValidIdProperty(id);
         _IProductService.RemoveProduct(id);
     }
     catch (Exception e)
     {
         return(SendRightStatus(e));
     }
     return(NoContent());
 }
示例#2
0
        public ActionResult <ProductCreateInputModel> Get(Guid id)
        {
            ProductCreateInputModel valueResult = null;

            try
            {
                ProductControllerHelperMethods.ValidIdProperty(id);
                valueResult = _IProductService.GetProduct(id);
            }
            catch (Exception e)
            {
                return(SendRightStatus(e));
            }

            return(Ok(valueResult));
        }