public async Task <PagedResult <OptionList> > GetAll(int pageNo, int pageSize, string orderByProperties, FilterNode filter = null)
        {
            var optionLists = _optionListRepository.GetOptionLists();

            if (filter != null)
            {
                optionLists = optionLists.ApplyFilter(filter).ToList();
            }
            var result = new PagedResult <OptionList>(optionLists, pageNo, pageSize, orderByProperties);

            return(await Task.FromResult(result));
        }
Beispiel #2
0
        public IActionResult GetOptionList()
        {
            try
            {
                var result = _optionListRepository.GetOptionLists();

                if (result != null)
                {
                    return(Ok(result));
                }
                return(NotFound());
            }
            catch (Exception ex)
            {
                _logger.LogError(string.Format("Error occured while getting option lists"), ex);
                return(new StatusCodeResult(StatusCodes.Status500InternalServerError));
            }
        }
        public IList <OptionList> GetOptionList()
        {
            var result = _optionListRepository.GetOptionLists();

            return(result);
        }