问题标签 [package-manager-console]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c# - How can I Update-Database?
this is the code used to generate the migration
dotnet ef migrations add InitialCreate --context DataContext --output-dir Migrations/SqlServerMigrations
and this is the DataContext.cs
but when I run
Upadate-Database
I get the error
"More than one DbContext was found. Specify which one to use. Use the '-Context' parameter for PowerShell commands and the '--context' parameter for dotnet commands."
How can I update the database using this migration?