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