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