Example #1
0
        public void AddToCart(string username, int pid)
        {
            using (var repo = new ShoppingCartRepository())
               {

               ProductView por = product.JustGetOne(pid);

               ShoppingCart obj = new ShoppingCart
               {
                   isBought = false,
                   Price = por.price,
                   ProuductName = por.Name,
                   Qty = 1,
                   SubCost = por.price,
                   Username = username,
                   ProductID = por.Id
               };

               repo.Insert(obj);
               }
        }
Example #2
0
 public void Insert(ShoppingCart model)
 {
     _CartRepository.Insert(model);
 }
Example #3
0
 public void Update(ShoppingCart model)
 {
     _CartRepository.Update(model);
 }
Example #4
0
 public void Delete(ShoppingCart model)
 {
     _CartRepository.Delete(model);
 }