public ActionResult DeleteConfirmed(int id)
        {
            PledgeType pledgeType = db.PledgeTypes.Find(id);

            db.PledgeTypes.Remove(pledgeType);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,Name")] PledgeType pledgeType)
 {
     if (ModelState.IsValid)
     {
         db.Entry(pledgeType).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(pledgeType));
 }
        public ActionResult Create([Bind(Include = "Id,Name")] PledgeType pledgeType)
        {
            if (ModelState.IsValid)
            {
                db.PledgeTypes.Add(pledgeType);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(pledgeType));
        }
        // GET: PledgeTypes/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PledgeType pledgeType = db.PledgeTypes.Find(id);

            if (pledgeType == null)
            {
                return(HttpNotFound());
            }
            return(View(pledgeType));
        }