ArvidsonFoto MVC NET8
1.0.0
MVC と .NET8 を使用した ArvidsonFoto の再構築 (.NET5 から .NET6 、そして .NET8 にアップグレード)
Web サイトを開始するには、いくつかの手順を完了する必要があります。
modelBuilder.InitialDatabaseSeed(); /ArvidsonFoto/Data/ArvidsonFotoDbContext.csの (約 163 行目)、関連データを含む新しいデータベースを作成できるようにします。dotnet ef database update --context ArvidsonFotoDbContextdotnet 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
