public ActionResult DeleteConfirmed(int id)
        {
            ProductMatchingBoardgame productMatchingBoardgame = db.ProductMatchingBoardgames.Find(id);

            db.ProductMatchingBoardgames.Remove(productMatchingBoardgame);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "ProductMatchingBoardgameId,BoardGameId,ProductId")] ProductMatchingBoardgame productMatchingBoardgame)
 {
     if (ModelState.IsValid)
     {
         db.Entry(productMatchingBoardgame).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.BoardGameId = new SelectList(db.BoardGames, "BoardGameId", "Name", productMatchingBoardgame.BoardGameId);
     ViewBag.ProductId   = new SelectList(db.Products, "ProductId", "Name", productMatchingBoardgame.ProductId);
     return(View(productMatchingBoardgame));
 }
        // GET: Admin/ProductMatchingBoardgames/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ProductMatchingBoardgame productMatchingBoardgame = db.ProductMatchingBoardgames.Find(id);

            if (productMatchingBoardgame == null)
            {
                return(HttpNotFound());
            }
            return(View(productMatchingBoardgame));
        }
        // GET: Admin/ProductMatchingBoardgames/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ProductMatchingBoardgame productMatchingBoardgame = db.ProductMatchingBoardgames.Find(id);

            if (productMatchingBoardgame == null)
            {
                return(HttpNotFound());
            }
            ViewBag.BoardGameId = new SelectList(db.BoardGames, "BoardGameId", "Name", productMatchingBoardgame.BoardGameId);
            ViewBag.ProductId   = new SelectList(db.Products, "ProductId", "Name", productMatchingBoardgame.ProductId);
            return(View(productMatchingBoardgame));
        }