Example #1
0
        public async Task <IActionResult> GetAll(
            [FromQuery] int currentPage    = 1,
            [FromQuery] int pageSize       = 20,
            [FromQuery] string sort        = "",
            [FromQuery] string queryString = "{ }")
        {
            return(await ExecuteFunction(async (user) =>
            {
                var filterObject = JsonSerializer.Deserialize <TitleQueryModel>(queryString);
                filterObject.CurrentPage = currentPage;
                filterObject.PageSize = pageSize;
                filterObject.Sort = sort;

                return await _titleService.GetAllAsync(filterObject);
            }));
        }
Example #2
0
 public PageResult <TitleDto> GetTitles(ODataQueryOptions <Title> options)
 {
     return(_titleService.GetAllAsync(options));
 }
Example #3
0
        public async Task <IEnumerable <Title> > GetAll()
        {
            var titles = await _titleService.GetAllAsync();

            return(titles);
        }