IEntityQuery<Zip> qryZips = new EntityQuery<Zip> ()
.Where<Zip> ( p => p.State.StartsWith ( "CA" ) );
So all California zip codes are in cache now.
What would happen if I execute the same query with order by criteria while displaying them in grid on UI.
CompositeSortSelector OrderByCriterion = new SortSelector ( typeof ( Zip ), "City", ListSortDirection.Ascending )
.ThenBy ( "Code", ListSortDirection.Ascending );
IEntityQuery<Zip> qryZips = new EntityQuery<Zip> ()
.Where<Zip> ( p => p.State.StartsWith ( "CA" ) )
.OrderBySelector<Zip> ( OrderByCriterion );
Is it going to hit the database OR will pull the entities from cache and will apply necessary sort criterion?