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