ArvidsonFoto MVC NET8
1.0.0
إعادة إنشاء ArvidsonFoto باستخدام MVC و.NET8 (تمت الترقية من .NET5 إلى .NET6 إلى .NET8)
لبدء موقع الويب، هناك بعض الخطوات التي يتعين عليك إكمالها.
modelBuilder.InitialDatabaseSeed();
(ca. السطر 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