NullReferenceException using built-in EF Core Driver

Hi, I'm creating a new connection in LINQPad 6 using built in EF Core driver (SQL Server) with default settings to my production database. Running a very simple select query on any table/view resulted in NullReferenceException. I have tried both netcore 3.1 and 5.0 and the result is still the same.

Is the problem in EF Core or LINQPad?


  • Does you reproduce this with a simple test database? And if not, are you able to send me the schema, or a subset of the schema that can reproduce the problem?

  • Following this issue with our DBA, we found that some of our tables have duplicated foreign keys. After removing the duplicate, LINQPad 6 works as expected. I don't know if this is the real cause, or if this is a bug or not, but LINQPad 5 with built-in driver has no problem with duplicated foreign keys.

Sign In or Register to comment.