public ActionResult DeleteConfirmed(int id) { Table_Student table_Student = db.Table_Student.Find(id); db.Table_Student.Remove(table_Student); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,FirstName,LastName,Age,Class,Religion")] Table_Student table_Student) { if (ModelState.IsValid) { db.Entry(table_Student).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(table_Student)); }
public ActionResult Create([Bind(Include = "Id,FirstName,LastName,Age,Class,Religion")] Table_Student table_Student) { if (ModelState.IsValid) { db.Table_Student.Add(table_Student); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(table_Student)); }
// GET: Student/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Table_Student table_Student = db.Table_Student.Find(id); if (table_Student == null) { return(HttpNotFound()); } return(View(table_Student)); }
partial void DeleteTable_Student(Table_Student instance);
partial void UpdateTable_Student(Table_Student instance);
partial void InsertTable_Student(Table_Student instance);