Esempio n. 1
0
        public JsonResult GetMajorList(int divisionId, int pageIndex, int pageSize = 8)
        {
            var result = _majorService.GetListByDivsionAsync(divisionId, pageIndex, pageSize);

            return(Success(data: new
            {
                total = result.Total,
                pageSize = pageSize,
                totalPage = (int)Math.Ceiling(result.Total * 1.0 / pageSize),
                list = result.Data
            }));
        }