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); })); }
public PageResult <TitleDto> GetTitles(ODataQueryOptions <Title> options) { return(_titleService.GetAllAsync(options)); }
public async Task <IEnumerable <Title> > GetAll() { var titles = await _titleService.GetAllAsync(); return(titles); }