This demo uses PetaPoco as a mini-ORM to get the data. More info on PetaPoco here.
This demo accesses the data directly, uses a SQL parameter for the PortalId then shows the first 10 files it finds. More intro-material for direct database access in this article on codeplex.
This demo accesses the data by filling it into a DataTable.