TicketController.cs updated to support pagination