public ActionResult UnFollowUser(string id) { if (id == Session["user"].ToString()) { return(Json("UnFollow option is for other user's profile!", JsonRequestBehavior.AllowGet)); } try { string user = Session["user"].ToString(); TwitterDBContext twitterDBContext = new TwitterDBContext(); dalLayer.UnFollowUser(id, user); return(Json(id + " - unfollowed!", JsonRequestBehavior.AllowGet)); } catch (Exception ex) { throw ex; } }