IRelationPredicateBucket bucket = new RelationPredicateBucket(PageEntiityFields.AppID == 2 & PageEntityFields.IsActive == true);
ISortExpression sort = new SortExpression(PageEntiityFields.NavOrder| SortOperator.Descending)
EntityCollection<PageEntities> entities = new EntityCollection<PageEntities>();
adapter.FetchEntityCollection(entites, bucket, 0, sort, null)
I think that code should be correct, I may have a few syntax errors. That will do all the filtering/sorting in sql. When ever I want to know what it is doing in sql, I usually enable tracing through the config file.
<system.diagnostics>
<switches>
<add name="SqlServerDQE" value="4"/>
</switches>
</system.diagnostics>
Keep working your way through the documentation, it has got all the information!