Пример #1
0
        public EnglishStringsDto GetAllEnglishString(EnglishStringPayload payload, int pageNumber, int pageSize)
        {
            EnglishStringsDto result = new EnglishStringsDto();

            try
            {
                var resourceInformationList = m_locAPIService.GetAllEnglishStrings(payload);
                var totalCount = resourceInformationList.Count;
                var totalPages = m_paginationService.CalculateTotalPage(totalCount, pageSize);
                result.PrevPage        = m_paginationService.GetPreviousPageLink(pageNumber);
                result.NextPage        = m_paginationService.GetNextPageLink(pageNumber, totalPages);
                result.ContextDocument = resourceInformationList.Skip(pageSize * pageNumber)
                                         .Take(pageSize).ToList();
            }
            catch (Exception ex)
            {
                m_loggerService.LogError(ex.Message);
            }
            return(result);
        }