public string AddCart([FromBody] Models.Cart cart) { var status = "Update failed"; try { EFModels.Cart cartb = new EFModels.Cart() { Itemid = cart.Itemid, Userid = cart.Userid, Quantity = cart.Quantity, }; status = _UserFacade.AddCart(cartb); } catch (Exception e) { status = e.Message; throw e; } return(status); }
public string UpdateCart([FromBody] Models.Cart cart) { var str = "Update cart failed in Controller method"; try { EFModels.Cart cartb = new EFModels.Cart() { Itemid = cart.Itemid, Userid = cart.Userid, Quantity = cart.Quantity, }; str = _UserFacade.UpdateCart(cartb); } catch (Exception e) { str = e.Message; throw e; } return(str); }
public string DeleteCart([FromBody] Models.Cart cart) { var str = string.Empty; try { EFModels.Cart cartb = new EFModels.Cart() { Itemid = cart.Itemid, Userid = cart.Userid, Quantity = cart.Quantity, }; str = _UserFacade.DelCart(cartb); } catch (Exception e) { str = e.Message; throw e; } return(str); }