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