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

Getting 'Object reference not set to an instance of an object.' exception #4

Closed
terryaney opened this issue Mar 16, 2016 · 8 comments
Closed

Comments

@terryaney
Copy link

I have a compiled context doing a simple query:

Profiles.Where( p => p.Client.cName == "AnnArbor" ).DumpPlan();

And it throws the exception. Not much information in the exception. Let me know what other information I can provide to help.

Trace:

at ExecutionPlanVisualizer.QueryPlanVisualizer.DumpPlan[T](IQueryable`1 queryable, Boolean dumpData)
at UserQuery
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

@terryaney
Copy link
Author

Hmm, seems to work against the dynamically created context from LINQPad against same DB/table. Are compiled contexts supported?

@borislitvak
Copy link

I can also report the above behavior on v4.57.02.
Did not check the dynamically created context part.

@Giorgi
Copy link
Owner

Giorgi commented Mar 19, 2016

@terryaney @borislitvak Do you use LINQ to SQL or Entity Framework typed data context?

@terryaney
Copy link
Author

I use LINQ to SQL…I see you just made EF work on another comment. But I know we have code for our L2S stuff that leverages a DbContextInterceptor (or whatever it is called) so hopefully you can find that available to you as well.

On Mar 19, 2016, at 4:10 PM, Giorgi notifications@github.com wrote:

@terryaney https://github.com/terryaney @borislitvak https://github.com/borislitvak Do you use LINQ to SQL or Entity Framework typed data context?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub #4 (comment)

@Giorgi
Copy link
Owner

Giorgi commented Mar 20, 2016

@terryaney I don't remember any class which is able to intercept LINQ to SQL queries. I will see what I can do to make it work.

@Giorgi Giorgi closed this as completed in 779cbda Mar 20, 2016
@Giorgi
Copy link
Owner

Giorgi commented Mar 20, 2016

This should be fixed now. Will publish a new release tomorrow.

@borislitvak
Copy link

I am still having the same issue with LINQ to Entities, as this tool only supports EF6 contexts.
This is the reason the LinqPad created context words.
Is there any way to make the tool work for EF5?

@Giorgi
Copy link
Owner

Giorgi commented Mar 22, 2016

@borislitvak Can you create a test data context dll and attach it to this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants