Skip to content

React to feedback on warning as error for ignored calls to Include() #9064

Closed
@divega

Description

@divega

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:

  1. 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.
  2. Revert the changes so that ignored Include() are again just warnings
  3. Go ahead with what we have but add a way to avoid the error at the query level
  4. Somehow special-case aggregate operations such as Count() so that they don't cause the error
  5. Revert the change but enable the error in ASP.NET templates
  6. Revert but create a new Include() method, e.g. MustInclude() which has stronger semantics and throws if ignored.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions