public ActionResult HeadMenu() { V308CMSEntities mEntities = new V308CMSEntities(); NewsRepository newsRepository = new NewsRepository(mEntities); List <NewsGroups> mNewsGroupsList; NewsPage mNewsPage = new NewsPage(); try { //lay cac menu của MENU mNewsGroupsList = newsRepository.LayNhomTinAll(); //Tao danh sach cac nhom tin mNewsPage.HtmlNhomTin = V308HTMLHELPER.TaoDanhSachMenu(mNewsGroupsList); return(View(mNewsPage)); } catch (Exception ex) { return(Content("Xảy ra lỗi hệ thống ! Vui lòng thử lại.")); } finally { mEntities.Dispose(); newsRepository.Dispose(); } }