public ActionResult AddProduxtToDatabase(int id, string size) { var product = new shopBasket() { ProductId = id, Size = size }; db.ShopBaskets.Add(product); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Index(shopBasket shopBasket) { db.ShopBaskets.Add(shopBasket); db.SaveChanges(); return(RedirectToAction("Index")); }