public IActionResult AddToCart(Cart obj)
 {
     try
     {
         _repo.AddToCart(obj);
         return(Ok());
     }
     catch (Exception ex)
     {
         return(NotFound(ex.InnerException.Message));
     }
 }
 public IActionResult AddToCart(Cart cart)
 {
     try
     {
         _repo.AddToCart(cart);
         return(Ok());
     }
     catch (Exception e)
     {
         return(NotFound(e.InnerException.Message));
     }
 }
예제 #3
0
        public IActionResult Addtocart(Cart obj)
        {
            try
            {
                _repo.AddToCart(obj);
                return(Ok());
            }

            catch (Exception e)
            {
                return(Ok(e.InnerException.Message));
            }
        }