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