public ActionResult Edit([Bind(Include = "journId,journFname,JournLname,journDOB,journContact,journEmail,journCity,Journalist_Image")] Journalist journalist) { if (ModelState.IsValid) { db.Entry(journalist).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(journalist)); }
public ActionResult Edit([Bind(Include = "articleId,journId,articleDate,articleTopic,articleTitle,articleDesc")] Article article) { if (ModelState.IsValid) { db.Entry(article).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.journId = new SelectList(db.Journalists, "journId", "journFname", article.journId); return(View(article)); }