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));
 }
Exemplo n.º 2
0
 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));
 }