ArvidsonFoto MVC NET8
1.0.0
MVC 및 .NET8을 사용하여 ArvidsonFoto 재구축(.NET5에서 .NET6, .NET8로 업그레이드)
웹사이트를 시작하려면 완료해야 할 몇 가지 단계가 있습니다.
modelBuilder.InitialDatabaseSeed();
(ca. line 163) /ArvidsonFoto/Data/ArvidsonFotoDbContext.cs 에서 관련 데이터로 새 데이터베이스를 생성할 수 있습니다.dotnet ef database update --context ArvidsonFotoDbContext
dotnet ef database update --context ArvidsonFotoIdentityContext
데이터 모델이 변경된 경우 새 마이그레이션을 만들려면 dotnet-ef migrations add DatabaseSeed --context ArvidsonFotoDbContext
명령을 실행하세요.
dotnet-ef database update
실행 시 오류 메시지가 표시되는 경우:
Could not execute because the specified command or file was not found.
Possible reasons for this include:
* You misspelled a build-in dotnet command.
* You intended to execute a .NET program , but dotnet-ef does not exist.
* You intended to run a global tool, but dotnet-prefixed executable with this name could not be found on the PATH.
그런 다음 다음 명령을 통해 설치되는 dotnet-ef CLI(dotnet 엔터티 프레임워크)를 설치해야 합니다.
dotnet tool install --global dotnet-ef
다음 명령을 사용하여 dotnet-ef를 버전 8.0.0 이상으로 업데이트하세요.
dotnet tool update --global dotnet-ef