public ActionResult Edit(CardModel cardmodel)
 {
     if (ModelState.IsValid)
     {
         db.Entry(cardmodel).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(cardmodel);
 }
        public ActionResult Create(CardModel cardmodel)
        {
            if (ModelState.IsValid)
            {
                db.CardModels.Add(cardmodel);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(cardmodel);
        }