public ActionResult Edit([Bind(Include = "missionID,missionName,missionPresidentName,missionAddress,missionLanguage,missionClimate,missionDomReligion,missionFlagURL")] Missions missions) { if (ModelState.IsValid) { db.Entry(missions).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(missions)); }
public ActionResult Create([Bind(Include = "missionID,missionName,missionPresidentName,missionAddress,missionLanguage,missionClimate,missionDomReligion,missionFlagURL")] Missions missions) { if (ModelState.IsValid) { db.Missions.Add(missions); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(missions)); }
// GET: Missions/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Missions missions = db.Missions.Find(id); if (missions == null) { return(HttpNotFound()); } return(View(missions)); }