public async Task <ActionResult <Page <TodoItem> > > GetTodoItems(Filter filter, string sort, PageData pageData) { var entityFilter = _mapper.Map <TodoItemFilter>(filter); var sortOrder = TodoItem.GetSortExpression(sort); var itemEntities = await _service.Find(entityFilter, sortOrder, pageData.Page, pageData.PageSize); var items = _mapper.Map <Page <TodoItem> >(itemEntities); return(Ok(items)); }