Skip to content

Query: Better exception message when invalid expression in Include #1883

Closed

Description

@rowanmiller

See this thread #1833
We should provide a clearer error stating that only navigation paths are allowed at the moment

Activity

  1. added this to the 7.0.0 milestone on Mar 23, 2015
  2. changed the title [-]Better exception message when invalid expression in Include[/-] [+]Query: Better exception message when invalid expression in Include[/+] on Dec 3, 2015
  3. modified the milestones: Backlog, 7.0.0 on Dec 8, 2015
  4. smitpatel commented on Aug 15, 2017

    @smitpatel
    Contributor

    @maumar - What would be current exception message?

  5. maumar commented on Aug 15, 2017

    @maumar
    Contributor

    Fix for #3910 should address this. New exception is (will double check that the scenario in the bug is affected)

    Lambda expression '{includeLambdaExpression}' is not valid for Include/ThenInclude result operator. The expression should represent a property access: 't => t.MyProperty'. Specify lambda parameter explicitly to access navigations on derived types: '(Derived t) => t.MyProperty'. For more information on including related data, see
    
  6. self-assigned this
    on Aug 15, 2017
  7. modified the milestones: 2.1.0, Backlog on Sep 7, 2017
  8. modified the milestones: , 2.1.0 on Nov 11, 2019
  9. added theissue type on Jun 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions