public ActionResult DeleteConfirmed(int id) { ClosedBusinessInReview closedBusiness = db.ClosedBusinessesInReview.Find(id); db.ClosedBusinessesInReview.Remove(closedBusiness); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Create([Bind(Include = "Id,Name,Address,DateClosed,CurrentStatus,ArticleLink,Img,Details,TotalMoneyOwed")] ClosedBusinessInReview closedBusiness) { if (ModelState.IsValid) { closedBusiness.Updated = DateTime.Now; db.ClosedBusinessesInReview.Add(closedBusiness); db.SaveChanges(); return(RedirectToAction("Index", "Home")); } return(View(closedBusiness)); }
// GET: ClosedBusinessInReview/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ClosedBusinessInReview closedBusiness = db.ClosedBusinessesInReview.Find(id); if (closedBusiness == null) { return(HttpNotFound()); } return(View(closedBusiness)); }