public void UpdateItem(string updateCartID, int updateProductID, int quantity)
 {
     using (var _db = new TechCoreSolutions.Models.TechEntities())
     {
         try
         {
             var myItem = (from c in _db.CartItems where c.CartId == updateCartID &&
                           c.Product.productId == updateProductID select c).FirstOrDefault();
             if (myItem != null)
             {
                 myItem.Quantity = quantity;
                 _db.SaveChanges();
             }
         }
         catch (Exception exp)
         {
             throw new Exception("ERROR: Unable to Update Cart Item - " + exp.Message.ToString(), exp);
         }
     }
 }
 public void RemoveItem(string removeCartID, int removeProductID)
 {
     using (var _db = new TechCoreSolutions.Models.TechEntities())
     {
         try
         {
             var myItem = (from c in _db.CartItems where c.CartId == removeCartID && c.Product.productId == removeProductID select c).FirstOrDefault();
             if (myItem != null)
             {
                 // Remove Item.
                 _db.CartItems.Remove(myItem);
                 _db.SaveChanges();
             }
         }
         catch (Exception exp)
         {
             throw new Exception("ERROR: Unable to Remove Cart Item - " + exp.Message.ToString(), exp);
         }
     }
 }