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