/// <summary>
 /// Deprecated Method for adding a new object to the Like_news EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToLike_news(Like_news_ like_news_)
 {
     base.AddObject("Like_news", like_news_);
 }
        public ActionResult Like(int id)
        {

            if (HttpContext.Session["id"] == null) return RedirectToAction("Index", "Home");

            Like_news_ ln = new Like_news_();
            ln.collaborateur_id = (int)HttpContext.Session["id"];
            ln.news_id = id;
            _db.AddToLike_news(ln);
            _db.SaveChanges();

            return RedirectToAction("Index", "Home");

        }
 /// <summary>
 /// Create a new Like_news_ object.
 /// </summary>
 /// <param name="id">Initial value of the id property.</param>
 public static Like_news_ CreateLike_news_(global::System.Int32 id)
 {
     Like_news_ like_news_ = new Like_news_();
     like_news_.id = id;
     return like_news_;
 }