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