Beispiel #1
0
        public ActionResult TinNhanh()
        {
            V308CMSEntities mEntities      = new V308CMSEntities();
            NewsRepository  newsRepository = new NewsRepository(mEntities);
            List <News>     mList          = null;
            string          str            = "";

            try
            {
                mList = newsRepository.LayDanhSachTinNhanh(5);
                str   = V308HTMLHELPER.TaoDanhSachTinHot(mList);
                return(View((object)str));
            }
            catch (Exception ex)
            {
                return(Content("<dx></dx>"));
            }
            finally
            {
                mEntities.Dispose();
                newsRepository.Dispose();
            }
        }