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