public ActionResult Edit(int Id) { NewsContext newsContext = new NewsContext(); ViewData["news"] = newsContext.GetNewsById(Id); CategoryContext categoryContext = new CategoryContext(); ViewData["ListCategories"] = categoryContext.GetAllCategories(); return(View()); }
public ActionResult View(int Id) { NewsContext newsBL = new NewsContext(); return(View(newsBL.GetNewsById(Id))); }