Suppose I have 3 entities Country , State and City .And Relationship is City->State->Country. Now I have query for Search like
return container.Countries.Include("States.Cities")
.Where(c=>c.States.Sum(s.Population)>10000)
.Search(filter)
.Skip(startIndex)
.Take(itemCount)
.ToList();
I am Including Cities to all States in above query , But I want to Include it at the end of Query that is after Take Method and before ToList method.Means Suppose query return 50 records I want to Include Cities to State only for that 50 records not for all States as in above query. Can someOne help how i Can do that ? Any help will be highly appericiable. This is just dummy query and I want to do this for Performance point of view. Thanks in advance