Пример #1
0
        public ActionResult Unlike(int postid, string userid)
        {
            int likeid = repository.GetLikeId(postid, userid);

            if (likeid != 0)
            {
                repository.Delete(likeid);
                repository.SaveChanges();
                return(RedirectToAction("List", "NewsFeed"));
            }
            return(HttpNotFound());
        }