public ActionResult DeleteConfirmed(int id) { ToReviewEntity toreviewentity = db.ReviewEntity.Find(id); db.ReviewEntity.Remove(toreviewentity); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit(ToReviewEntity toreviewentity) { if (ModelState.IsValid) { db.Entry(toreviewentity).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(toreviewentity)); }
// // GET: /Review/Edit/5 public ActionResult Edit(int id = 0) { ToReviewEntity toreviewentity = db.ReviewEntity.Find(id); if (toreviewentity == null) { return(HttpNotFound()); } return(View(toreviewentity)); }
public ActionResult Create(ToReviewEntity toreviewentity) { if (ModelState.IsValid) { db.ReviewEntity.Add(toreviewentity); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(toreviewentity)); }
// // GET: /Review/Details/5 public ActionResult Details(int id = 0) { ToReviewEntity toreviewentity = db.ReviewEntity.Find(id); if (toreviewentity == null) { return(HttpNotFound()); } ToReviewEntityVM _vm = new ToReviewEntityVM(); _vm.Link = toreviewentity.Link; _vm.Description = toreviewentity.Description; _vm.Name = toreviewentity.Name; _vm.ToReviewEntityID = toreviewentity.ToReviewEntityID; _vm.MsgToClient = "Reviews ..."; return(View(_vm)); }