public void Delete(int model) { using (var rep = new ShoppingCartRepository()) { var dev = rep.GetById(model); rep.Delete(dev); } }
public void Update(ShoopingCartView modelVie) { using (var rep = new ShoppingCartRepository()) { var dev = rep.GetById(modelVie.Id); if (dev != null) { dev.Qty = modelVie.Qty; dev.SubCost = modelVie.Qty*dev.Price; rep.Update(dev); } } }