public ActionResult DeleteConfirmed(int id)
        {
            ExpenseTrackerAndHomeNeeds expenseTrackerAndHomeNeeds = db.ExpenseTrackerAndHomeNeeds.Find(id);

            db.ExpenseTrackerAndHomeNeeds.Remove(expenseTrackerAndHomeNeeds);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,Name,Home_NeedsId,ExpenseTrackerId")] ExpenseTrackerAndHomeNeeds expenseTrackerAndHomeNeeds)
 {
     if (ModelState.IsValid)
     {
         db.Entry(expenseTrackerAndHomeNeeds).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Home_NeedsId     = new SelectList(db.Home_Needs, "Id", "Entity", expenseTrackerAndHomeNeeds.Home_NeedsId);
     ViewBag.ExpenseTrackerId = new SelectList(db.ExpenseTrackers, "Id", "Name", expenseTrackerAndHomeNeeds.ExpenseTrackerId);
     return(View(expenseTrackerAndHomeNeeds));
 }
        // GET: ExpenseTrackerAndHomeNeeds/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ExpenseTrackerAndHomeNeeds expenseTrackerAndHomeNeeds = db.ExpenseTrackerAndHomeNeeds.Find(id);

            if (expenseTrackerAndHomeNeeds == null)
            {
                return(HttpNotFound());
            }
            return(View(expenseTrackerAndHomeNeeds));
        }
        // GET: ExpenseTrackerAndHomeNeeds/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ExpenseTrackerAndHomeNeeds expenseTrackerAndHomeNeeds = db.ExpenseTrackerAndHomeNeeds.Find(id);

            if (expenseTrackerAndHomeNeeds == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Home_NeedsId     = new SelectList(db.Home_Needs, "Id", "Entity", expenseTrackerAndHomeNeeds.Home_NeedsId);
            ViewBag.ExpenseTrackerId = new SelectList(db.ExpenseTrackers, "Id", "Name", expenseTrackerAndHomeNeeds.ExpenseTrackerId);
            return(View(expenseTrackerAndHomeNeeds));
        }