コード例 #1
0
        public ActionResult Follow(string Id)
        {
            string id = Id;
            DataRepository helper = new DataRepository();
            if (!helper.AlreadyFollowingUser(Session["Username"].ToString(), Id))
                helper.AddFollowConnection(Session["Username"].ToString(), Id);

            ViewData["Username"] = id;
            ViewData["Following"] = helper.getFollowingCount(Id);
            ViewData["FollowedBy"] = helper.getFollowedByCount(Id);

            return PartialView();
        }