Notice
Recent Posts
Recent Comments
Link
«   2025/10   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

리액트 정리

[ASP.Net] "Rating" column not being added when running: dotnet ef database update 본문

Uncategorized

[ASP.Net] "Rating" column not being added when running: dotnet ef database update

버그킴 2020. 2. 14. 14:08

https://docs.microsoft.com/en-us/aspnet/core/tutorials/razor-pages/new-field?view=aspnetcore-2.2&tabs=visual-studio

 

Add a new field to a Razor Page in ASP.NET Core

Shows how to add a new field to a Razor Page with Entity Framework Core

docs.microsoft.com

 

1: remove current database
2: run 'dotnet ef migrations remove' to remove all migrations
3: run 'dotnet ef migrations add initialCommit --context initialCommitContext'
4: run 'dotnet ef database update'

 

$ dotnet ef migrations add InitialCreate 
$ dotnet ef database update

 

 

 

 

$ dotnet watch run
$ dotnet ef migrations add "NsccCourseMap" --context NsccCourseMapContext
$ dotnet ef database update --context NsccCourseMapContext
$ dotnet run

 

scaffold pages corresponding to models

$  dotnet aspnet-codegenerator razorpage -m Semester -dc NsccCourseMapContext -udl -outDir Pages/Semesters --referenceScriptLibraries