public void Post([FromBody]Cart cart)
 {
     CartFacade facade = new CartFacade(db);
     if (facade.Get(cart.ID) == null)
     {
         facade.Insert(cart);
     }
     else
     {
         facade.Update(cart);
     }
 }
 public void Post([FromUri]int cartId, [FromBody]int quantity)
 {
     CartFacade facade = new CartFacade(db);
     facade.UpdateQuantity(cartId, quantity);
 }
 public void MarkOrdersAsPaid([FromBody]List<Cart> carts)
 {
     CartFacade facade = new CartFacade(db);
     facade.MarkOrdersAsPaid(carts);
 }
 public List<Cart> GetOrdersInCart(string userId)
 {
     CartFacade facade = new CartFacade(db);
     return facade.GetOrdersInCart(userId);
 }
 public int GetAmountOfOrders(string userId)
 {
     CartFacade facade = new CartFacade(db);
     return facade.GetAmountOfOrders(userId);
 }
 // DELETE: api/Cart/5
 public void Delete(int id)
 {
     CartFacade facade = new CartFacade(db);
     facade.Delete(id);
 }