Exemplo n.º 1
0
        public async Task <IActionResult> GetQuyen([FromQuery] string keywords       = null,
                                                   [FromQuery] Pagination pagination = null)
        {
            var query = _quyenService.GetQuyen(keywords);
            var quyen = PagedList.Create(query, pagination.Page - 1, pagination.ItemsPerPage);

            pagination.TotalItems = quyen.TotalCount;
            var result = new PagedResult <QuyenDTO>(pagination, quyen.Select(QuyenDTO.FromEntity));

            return(Ok(result));
        }
 public void OnGet(int id)
 {
     Quyen = _QuyenService.GetQuyen(id);
 }