public ActionResult Index() { var pageObj = movie_bll.PageFilm(1, 20, TuHaoQuNa.Domain.Enum.OrderBy.在看人数); var list = pageObj == null? null : pageObj.Items .Select(m => new Models.Film { Describe = m.Describe, Family = m.Family, DouBanID = m.DouBanID, Name = m.Name, Poster = m.Poster, Score = m.Score, Year = m.Year }); return(View(list)); }
public ApiResult GetHotFilm(PageParamsDto data) { var pageObj = movie_bll.PageFilm(data.page, data.pageSize, Domain.Enum.OrderBy.在看人数); return(new ApiResult() { StatusCode = HttpStatusCode.OK, Data = new { list = pageObj.Items.Select(m => new Film { Describe = m.Describe, Family = m.Family, DouBanID = m.DouBanID, Name = m.Name, Poster = m.Poster, Score = m.Score, Year = m.Year }), page = pageObj.CurrentPage, pageSize = pageObj.ItemsPerPage, totalPage = pageObj.TotalPages } }); }