Answer the question
In order to leave comments, you need to log in
How to decorate Expression?
Asp.Net MVC, MS Sql, Entity Framework
There is a query that aggregates a dozen large tables. It looks something like this:
_db.Table.Where(t=>...)
.Select(t=>new Model{
Field1 = t.SomeTable.Field
Field2 = t.SomeTable2.Field
...итд, около 30ти полей...}).ToList();
Answer the question
In order to leave comments, you need to log in
Problems like this come up on a regular basis. I build the text of the SQL query manually, without any Linq to SQL.
Depending on the current needs, I include in the text of the SQL query those tables, conditions, groupings, etc. that are needed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question