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