Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement suggestion: add reference to source code when issuing warnings #16740

Closed
fhurta opened this issue Jul 25, 2019 · 1 comment
Closed
Labels
closed-no-further-action The issue is closed and no further action is planned. customer-reported

Comments

@fhurta
Copy link

fhurta commented Jul 25, 2019

I see warnings like the one below here and there in the log files. However, as the code base is quite large and there are lot of queries, it is not easy to track down to which query is the warning related. Would it be possible to extend the message with source file name and line number?
Or any glues how to find the query in the code that is causing the warning?

The Include operation for navigation '[t].Tenant' is unnecessary and was ignored because the navigation is not reachable in the final query results. See https://go.microsoft.com/fwlink/?linkid=850303 for more information. <s:Microsoft.EntityFrameworkCore.Query>

Further technical details

EF Core version: 2.2.6
Database Provider: Microsoft.EntityFrameworkCore.SqlServer
Operating system: Windows 10, Azure App Service
IDE: Visual Studio 2019 16.1.2

@ajcvickers
Copy link
Contributor

@fhurta There isn't a way to do this automatically (that's actually a hard problem: #14134) but you can add tags to your queries

@ajcvickers ajcvickers added the closed-no-further-action The issue is closed and no further action is planned. label Jul 25, 2019
@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-no-further-action The issue is closed and no further action is planned. customer-reported
Projects
None yet
Development

No branches or pull requests

2 participants