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)); } }
public IActionResult Addtocart(Cart obj) { try { _repo.AddToCart(obj); return(Ok()); } catch (Exception e) { return(Ok(e.InnerException.Message)); } }