LINQPad 8 - Can't create EF Core connection
LINQPad 8.8.9
Custom assembly with EF 9 and Devart dotConnect for Oracle 10.4.193.9
I add Additional References Devart.Data.Oracle.dll and Devart.Data.Oracle.Entity.EFCore.dll in LINQPad.
My DbContext class has a constructor who take a connection string and us it as mentionned in "Help my choose" in Entity Framework DbContext Connection windows.
I create a new connection as "Use a typed data context from your own assembly" -> "Entity Framework Core (3.x -> 9.x) and :
- choose my project dll in "Path th Custom Assembly"
- choose my DbContext in "Full Type Name of Typed DbContext"
- choose "Via constructor that accepts a string" and past the connection string used in my working application
When I test the connection, I receive the error "Error Testing Custom EF Core Connection: Object reference not set to an instance of an object". No stack trace, no other information.
Any idea ?
Answers
You should see a stack trace in the Log file.
Alternatively, don't try to test the connection, but use it in a query and I think you should see a stack trace.
Failing that, if you have the source for your dll and can change it , you can temporarily add Debugger.Launch in a static constructor and that should allow you to launch Visual Studio to debug it.
Thank you @sgmoore, I try my connection with a query and it works. And I have nothing in the log file (C:\Users\\AppData\Local\LINQPad\Logs.LINQPad8\log.txt).
On the other hand, under the connection name in the connections list, it is written "(Populating)". It will be great to have the list of my DbSets...