public ActionResult DeleteConfirmed(int id) { LoanRateInterest loanRateInterest = db.LoanRateInterests.Find(id); db.LoanRateInterests.Remove(loanRateInterest); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Percentage,Date")] LoanRateInterest loanRateInterest) { if (ModelState.IsValid) { db.Entry(loanRateInterest).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(loanRateInterest)); }
public ActionResult Create([Bind(Include = "Id,Percentage,Date")] LoanRateInterest loanRateInterest) { if (ModelState.IsValid) { db.LoanRateInterests.Add(loanRateInterest); db.SaveChanges(); return(RedirectToAction("InterestRateDashboardIndex", "InterestRatesDashboard")); } return(View(loanRateInterest)); }
// GET: LoanRateInterest/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } LoanRateInterest loanRateInterest = db.LoanRateInterests.Find(id); if (loanRateInterest == null) { return(HttpNotFound()); } return(View(loanRateInterest)); }