예제 #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);
               }
        }
예제 #2
0
 public void Insert(ShoppingCart model)
 {
     _CartRepository.Insert(model);
 }
예제 #3
0
 public void Update(ShoppingCart model)
 {
     _CartRepository.Update(model);
 }
예제 #4
0
 public void Delete(ShoppingCart model)
 {
     _CartRepository.Delete(model);
 }