Options
Error Entity Framework Core - Connection ok - Instance failure on query
I am using linqpad 6 with an Entity Framework Core connection which tests fine, however if I try to query data from a table I get an instance failure
Comments
this.Database.GetDbConnection().ConnectionString
If it doesn't output what you expect, go back to the connection properties. Which option did you choose in how LINQPad should instantiate your context?
Via a constructor that accepts a DbConnectionOptions.
There are a couple of different overloads for it but I created one specifically for linqpad.
In the connection window it shows the connection and I can browse the tables and fields, but if you try any query e.g. just drag a table to the query window and execute, this produces an Instance failure.
The differences are from table splitting.
And have you tried testing the constructor overload you created for LINQPad from Visual Studio?
I went back to the original context and just redid it this now works too.
It doesn't make sense but now works so will just accept it and move on.