public ActionResult Create(PFTApp.Models.Attribute attribute) { if (ModelState.IsValid) { db.Attributes.Add(attribute); db.SaveChanges(); return RedirectToAction("Index"); } return View(attribute); }
public ActionResult Edit(PFTApp.Models.Attribute attribute) { if (ModelState.IsValid) { db.Entry(attribute).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(attribute); }