Exemplo n.º 1
0
 public ActionResult NewsDetails(string NewsUrl)
 {
     ViewBag.activemenu = "News";
     if (db.NewsMasters.Count(x => x.NewsUrl == NewsUrl) > 0)
     {
         var SelectedNewsdetails = (from l in db.spSelectedNewsDetails(NewsUrl)
                                    select new NewsDetailsVM
         {
             NewsDetail = l.NewsDescription,
             NewsTitle = l.NewsTitle,
             NewsPublishingDate = Convert.ToDateTime(l.PublishingDate),
             CategoryName = l.CategoryName,
             CategoryUrl = l.CategoryUrl,
             NewsImage = l.NewsImage
         }).FirstOrDefault();
         return(View(SelectedNewsdetails));
     }
     else
     {
         return(HttpNotFound());
     }
 }