public ActionResult DeleteConfirmed(int id) { Followed_Post followed_Post = db.Followed_Posts.Find(id); db.Followed_Posts.Remove(followed_Post); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Main_Post_Id,Followed_Post_Id,Order")] Followed_Post followed_Post) { if (ModelState.IsValid) { db.Entry(followed_Post).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(followed_Post)); }
public ActionResult Create([Bind(Include = "Id,Main_Post_Id,Followed_Post_Id,Order")] Followed_Post followed_Post) { if (ModelState.IsValid) { db.Followed_Posts.Add(followed_Post); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(followed_Post)); }
// GET: Followed_Post/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Followed_Post followed_Post = db.Followed_Posts.Find(id); if (followed_Post == null) { return(HttpNotFound()); } return(View(followed_Post)); }