public ActionResult Create() { CurryTypes food = new CurryTypes(); food.LastModified = DateTime.Now; return(View(food)); }
public ActionResult DeleteConfirmed(int id) { CurryTypes curryTypes = db.CurryTypes.Find(id); db.CurryTypes.Remove(curryTypes); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,CurryTypeName,LastModified,LastModifiedBy")] CurryTypes curryTypes) { if (ModelState.IsValid) { db.Entry(curryTypes).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(curryTypes)); }
public ActionResult Create([Bind(Include = "ID,CurryTypeName,LastModified,LastModifiedBy")] CurryTypes curryTypes) { if (ModelState.IsValid) { db.CurryTypes.Add(curryTypes); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(curryTypes)); }
public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CurryTypes curryTypes = db.CurryTypes.Find(id); if (curryTypes == null) { return(HttpNotFound()); } return(View(curryTypes)); }