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