Closed
Description
We have got quite a bit of feedback over at #9030 (please keep the discussion there). Most of it is positive about the change but some legitimate concerns have been raised about general purpose code which can take any existing query and perform operations such as Count()
on it, which will now throw the error if the original query has any calls to Include()
.
Just to list some of the possible options:
- Go ahead with what we have right now: the warning causes an error and the error can be avoided by removing the
Include()
or disabling the error globally. - Revert the changes so that ignored
Include()
are again just warnings - Go ahead with what we have but add a way to avoid the error at the query level
- Somehow special-case aggregate operations such as
Count()
so that they don't cause the error - Revert the change but enable the error in ASP.NET templates
- Revert but create a new
Include()
method, e.g.MustInclude()
which has stronger semantics and throws if ignored.