public ActionResult DeleteConfirmed(int id) { CanHelp canHelp = db.CanHelps.Find(id); db.CanHelps.Remove(canHelp); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "CanHelpId,FirstName,LastName,Email,CreditCard,CV,Amount")] CanHelp canHelp) { if (ModelState.IsValid) { db.Entry(canHelp).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("DonateConfirmed", new { id = canHelp.CanHelpId })); } return(View(canHelp)); }
// GET: CanHelps/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CanHelp canHelp = db.CanHelps.Find(id); if (canHelp == null) { return(HttpNotFound()); } return(View(canHelp)); }