public IActionResult Get() { var pagination = Request.Headers["Pagination"]; if (!string.IsNullOrEmpty(pagination)) { string[] vals = pagination.ToString().Split(','); int.TryParse(vals[0], out offset); int.TryParse(vals[1], out pageSize); } int currentOffset = offset; int currentPageSize = pageSize; var totalSkills = _skillRepository.Count(); IEnumerable <Skill> skills = _skillRepository.GetSkills(currentOffset, currentPageSize); IEnumerable <SkillDto> skillsVM = Mapper.Map <IEnumerable <Skill>, IEnumerable <SkillDto> >(skills); Response.AddPagination(totalSkills); return(new OkObjectResult(skillsVM)); }