public ActionResult Create(ConferenceArticle conferencearticle) { this.ValidateRequest = false; if (ModelState.IsValid) { db.ConferenceArticles.Add(conferencearticle); db.SaveChanges(); return RedirectToAction("Index"); } ViewBag.ColumnId = new SelectList(db.ConferenceColumn, "Id", "Name", conferencearticle.ColumnId); return View(conferencearticle); }
public ActionResult Edit(ConferenceArticle conferencearticle) { this.ValidateRequest = false; if (ModelState.IsValid) { db.Entry(conferencearticle).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } ViewBag.ColumnId = new SelectList(db.ConferenceColumn, "Id", "Name", conferencearticle.ColumnId); return View(conferencearticle); }