List data from db

How do I list all object from a database class

what part doesn’t work?

I am looking for a code to achieve this, for now I am just querying based on not empty