Creating Datasource for entity list

Hi,

I have a list of entities of type Item which is generated based on a complex calculation, I want to make a datasource for a table using this result with pagination and table sorting working on the result how can I achieve this.

Thanks