public ActionResult DeleteConfirmed(int id)
        {
            CardsInDeckTB cardsInDeckTB = db.CardsInDeckTBs.Find(id);

            db.CardsInDeckTBs.Remove(cardsInDeckTB);
            db.SaveChanges();
            return(RedirectToAction("Index", "DeckTBs"));
        }
 public ActionResult Edit([Bind(Include = "Id,DeckId,CardId")] CardsInDeckTB cardsInDeckTB)
 {
     if (ModelState.IsValid)
     {
         db.Entry(cardsInDeckTB).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index", "DeckTBs"));
     }
     return(View(cardsInDeckTB));
 }
        public ActionResult Create([Bind(Include = "Id,DeckId,CardId")] CardsInDeckTB cardsInDeckTB)
        {
            if (ModelState.IsValid)
            {
                db.CardsInDeckTBs.Add(cardsInDeckTB);
                db.SaveChanges();
                return(RedirectToAction("Index", "DeckTBs"));
            }

            return(View(cardsInDeckTB));
        }
        // GET: CardsInDeckTBs/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CardsInDeckTB cardsInDeckTB = db.CardsInDeckTBs.Find(id);

            if (cardsInDeckTB == null)
            {
                return(HttpNotFound());
            }
            return(View(cardsInDeckTB));
        }