I have this query:
var query = this.EmailEntityManager.EmailFolderEntities.Where(a => a.EmailAccountId == this.CurrentEmailAccount.Id).Where(a=> a.Visible == true).Where(a => a.IsDeleted ==false);
EmailFolderEntities has several navigation properties such as EmailAccount and ChildFolders. When the query executes, these navigation properties are being populated. The issue with that is that it slows down the query dramatically - like from a second or two to 10 seconds. If I delete the navigation properties, then the query speeds up again.
I thought that the navigation properities would not be populated unless there was a specific "Include" statement in the query such as
var query = this.EmailEntityManager.EmailFolderEntities.Where(a => a.EmailAccountId == this.CurrentEmailAccount.Id).Where(a=> a.Visible == true).Where(a => a.IsDeleted ==false)
.include("EmailAccount");
Greg