public ActionResult DeleteConfirmed(int id) { day_of_week day_of_week = db.day_of_week.Find(id); db.day_of_week.Remove(day_of_week); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "DayCode,DayShortName,DayLongName")] day_of_week day_of_week) { if (ModelState.IsValid) { db.Entry(day_of_week).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(day_of_week)); }
public ActionResult Create([Bind(Include = "DayCode,DayShortName,DayLongName")] day_of_week day_of_week) { if (ModelState.IsValid) { db.day_of_week.Add(day_of_week); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(day_of_week)); }
// GET: day_of_week/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } day_of_week day_of_week = db.day_of_week.Find(id); if (day_of_week == null) { return(HttpNotFound()); } return(View(day_of_week)); }