Is there an easy way to scaffold migrations using old EF outside of Visual Studio? I would like to do it via Rider IDE if it possible.
I don't see these options related to ef core. The plugin makes sense.
(For MacOS, be sure, your dotnet root folder path is /usr/local/share/dotnet/
. I'm telling this because Rider installs and places it in another folder. Further it gives rise ef to not work properly. You can see your dotnet folder on terminal by writing which dotnet
)
Then,
For EF Core, you can use https://blog.jetbrains.com/dotnet/2017/08/09/running-entity-framework-core-commands-rider/
For EF 6 you may want to check https://blog.jetbrains.com/dotnet/2018/04/06/entity-framework-support-rider-2018-1/
migrate.exe
for EF 6
how can I make update-database
or add-migration
? –
Illaffected You can also use a jetbrains plugin made for handling migrations
The Package Manager Console tools such as Add-Migration
, Scaffold-DbContext
commands are PowerShell-based, and the Package Manager Console ties to several Visual Studio-specific objects making it impossible to host it elsewhere - in your case Rider.
In Rider's terminal or anywhere outside of Visual Studio, you can use CLI tools. Equivalents to the highlighted commands would be respectively:
Add-Migration
=>dotnet ef migrations add MigrationName
Scaffold-DbContext
=>dotnet ef dbcontext scaffold
You can get more details on JetBrains blog: Running EF Core commands in Rider
© 2022 - 2024 — McMap. All rights reserved.