Пример #1
0
        //
        // GET: /Category/

        public ActionResult View(int id)
        {
            CategoryDAO   cDao    = new CategoryDAO();
            FilmDAO       fiDao   = new FilmDAO();
            var           listCat = cDao.GetAllCategory();
            CategoryModel cm      = new CategoryModel()
            {
                ListCategory       = listCat,
                CurrentCat         = cDao.GetACategory(id),
                Account            = null,
                TopFilm            = fiDao.GetTopFilm(5),
                NewFilm            = fiDao.GetTopNewestFilm(5),
                FilmOfThisCategory = fiDao.GetListFilmOfACategory(id),
            };

            return(View(cm));
        }