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