EF pre-generated views with all navigational properties
===

I have bit complex entity structure. I used word 'complex', not just because so many tables, it also has lost of inheritance, navigation properties, etc. 

EF takes almost 300-400 seconds, when I retrieve an object including all navigation properties. Even though, I don't have much data in the database. I have checked SQL query generated by EF using SQL Profiler. It is really a very huge query with ~10K lines. 

In order to improve the performance, I have split my retrieval part. I mean, rather including all navigation properties, now I am retrieving some of them explicitly. It has increased the performance by 90%. But still it is taking 30-40 seconds. 

Example: 
Earlier code

    dbContext.Set<MainEntity>().Include("NavEntity1")
        .Include("NavEntity2")
        .Include("NavEntity3")
        .Include("NavEntity4")...ToArray();

Changed to 

    dbContext.Set<NavEntity1>().ToArray();
    dbContext.Set<NavEntity2>().ToArray();
    ...

I tried using pre-generated views. Unfortunately there is no benefit at all. 

 - How do I generate views which includes all navigation properties?

NB: I have two separate projects, one for entities and another for context. Since, I have to deal with multiple DBs, I am building model manually using DbModelBuilder and instantiate a context object using DbCompiledModel. My class which contains pre-generated views is in the project where I have context. 

Please guide how do I deal with this situation and improve the performance. 

