VideoController.cs 694 B

1234567891011121314151617181920212223
  1. using System.ComponentModel;
  2. using CZKJ.GBRS2.Interface;
  3. using Microsoft.AspNetCore.Mvc;
  4. namespace CZKJ.GBRS2.WebMVC.Controllers
  5. {
  6. public class VideoController : Controller
  7. {
  8. IVideo _videoLogic;
  9. public VideoController(IVideo videoLogic)
  10. {
  11. _videoLogic = videoLogic;
  12. }
  13. public IActionResult Index(int pageIndex=1,int pageSize=6)
  14. {
  15. int rowsCount;
  16. var list = _videoLogic.GetEntities(out rowsCount,null ,pageIndex,pageSize,x =>x.SortOrder,ListSortDirection.Descending);
  17. ViewBag.RowsCount = rowsCount;
  18. ViewBag.PageIndex = pageIndex;
  19. return View(list);
  20. }
  21. }
  22. }