public ActionResult Create(HardwareModel hardwaremodel)
        {
            if (ModelState.IsValid)
            {
                db.HardWareModels.Add(hardwaremodel);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(hardwaremodel);
        }
 public ActionResult Edit(HardwareModel hardwaremodel)
 {
     if (ModelState.IsValid)
     {
         db.Entry(hardwaremodel).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(hardwaremodel);
 }