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