public IHttpActionResult GetSkillsForPage(int pageNumber = 1, int itemsPerPage = 10, string sortField = "Id", string sortOrder = "DESC") { try { if (!(sortOrder == SortingService.SortByAscending || sortOrder == SortingService.SortByDescending)) { return(BadRequest("Invalid sort order")); } return(Ok(_skillService.GetSkillsForPage(pageNumber, itemsPerPage, sortField, sortOrder))); } catch (Exception ex) { return(InternalServerError(ex)); } }