Пример #1
0
        // GET: Like
        public ActionResult Add(int postid, string userid)
        {
            Like like = new Like()
            {
                PostID = postid,
                UserID = userid,
                Status = 1
            };

            repository.Add(like);
            repository.SaveChanges();
            return(RedirectToAction("List", "NewsFeed"));
        }