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