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); } }
public void Insert(ShoppingCart model) { _CartRepository.Insert(model); }
public void Update(ShoppingCart model) { _CartRepository.Update(model); }
public void Delete(ShoppingCart model) { _CartRepository.Delete(model); }