public ActionResult Delete(int id, TweetVM collection) { try { if (ModelState.IsValid) { Tweet t = new Tweet() { Tweet_Id = id, UserId = collection.UserId, message = collection.message, created = DateTime.Now }; obj.DeleteTweet(t); return(RedirectToAction("Index")); } else { return(View()); } } catch (Exception Ex) { Logger.WriteError(Ex, "Delete", "Home"); return(View("Error")); } }
public JsonResult DeleteTweet(int tweetId) { tweetBL.DeleteTweet(tweetId); var result = "success"; return(Json(result, JsonRequestBehavior.AllowGet)); }
public bool DeleteTweet(TweetDTO tweetObj) { return(TweetBL.DeleteTweet(tweetObj)); }
public JsonResult DeleteTweet(TWEET tweet) { tweetObj.DeleteTweet(tweet); return(Json("", JsonRequestBehavior.AllowGet)); }