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