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