public ActionResult Edit(Software software) { if (ModelState.IsValid) { db.Entry(software).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } ViewBag.OSSystemID = new SelectList(db.OSSystems, "OSSystemID", "OSSystemname", software.OSSystemID); return View(software); }
public ActionResult Create(Software software) { if (ModelState.IsValid) { db.Softwares.Add(software); db.SaveChanges(); return RedirectToAction("Index"); } return View(software); }