Asp.Net MVC, MS Sql, Entity Framework
Is there a query that aggregates a dozen large tables. It looks like this:
_db.Table.Where(t=>...) .Select(t=>new Model{ Field1 = t.SomeTable.Field Field2 = t.SomeTable2.Field ...etc, about 30 fields...}).ToList();
The work is still not particularly fast, the load on the database creates is palpable.
The question is:
It often happens that some fields are not needed, and accordingly some aggregated tables are not needed, and therefore need to make a "base" Expression and decorate it need more fields.
Just to describe all the possible options is theoretically possible, but the variability is large.
Is there any way to decorate Expression? Or are there other ideas how to solve this problem?