Closed lenscas closed 1 year ago
@lenscas make sure you have the dotnet ef
tool installed and that it's v6 or higher:
dotnet tool update --global dotnet-ef
Then restart NetPad. You must have an older version of the ef
tool, the namespace
option was introduced with .NET 5. To see your current version:
dotnet ef --version
ah, that makes sense. Totally forgot about ef
and yes, I had an old version installed (3.0.0). Updating it seemed to have fix the issue. Might be worth to add it to the list of dependencies, especially the check it did when I first started it?
Anyway, thanks for the help :)
Agreed, I'll add that. Its currently checking for the existence of the ef
tool, but not its version.
PR merged. Change will go out with next release.
Awesome. Sounds great :tada:
I already used netpad a few times to help debug complicated queries and the like. Linqpad is not an option for me as I am not using Windows. So, thanks for making netpad :)
I'm glad you're enjoying it. It makes my day hearing you were able to use NetPad to better engineer a solution, these type of comments make it all worth while :) Thanks for sharing!
Not just engineer a better solution, but actually make an EFCore query work. It had become rather big and apparently in some situations had problems with something being null that it didn't expect.
EFCore being efcore didn't really tell me what field or anything close to that was the problematic field.
Netpad allowed to me to quickly test out versions of it that forced client side evaluation at different parts of the query until I got an idea of what and where the problem was.
Which is a lot easier to do in netpad than "making a change in the codebase, waiting for it to compile and then making a request while staring at the console output while you make the problematic request which inevitably also floods the console"
It also helped me design a query from scratch after I noticed that the query I was using was slow. I already knew the problem in the generated SQL and now what SQL had to be generated in order to fix it but... getting there was not easy as EFCore just didn't support the operation natively that I needed (distinct on).
That's awesome! :tada: Very happy you were able to traverse that hill and I couldn't be happier with how NetPad helped you do that. Thank you again for sharing!!
I just installed netpad version 0.4 on macos, and then installed the .NET7 SDK and later tried installing the 6 as well. In both cases though it fails to scaffold against my postgresql database with the error:
The same seems to be happening on version 0.3.1