public ActionResult Edit(Campaign camp) { if (ModelState.IsValid) { dbcon.Entry(camp).State = EntityState.Modified; dbcon.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.OrgId = new SelectList(dbcon.Organisations, "id", "Name", camp.OrgId); return(View(camp)); }
public ActionResult Edit(Organisation ogr) { if (ModelState.IsValid) { dbcon.Entry(ogr).State = EntityState.Modified; dbcon.SaveChanges(); return(RedirectToAction("Index")); } return(View(ogr)); }