Exemplo n.º 1
0
        public ActionResult Edit(int Id)
        {
            NewsContext newsContext = new NewsContext();

            ViewData["news"] = newsContext.GetNewsById(Id);
            CategoryContext categoryContext = new CategoryContext();

            ViewData["ListCategories"] = categoryContext.GetAllCategories();
            return(View());
        }
Exemplo n.º 2
0
        public ActionResult View(int Id)
        {
            NewsContext newsBL = new NewsContext();

            return(View(newsBL.GetNewsById(Id)));
        }