حل ارور Remove-Migration

حسین صحرایی
20 اسفند ۱۴۰۰

سلام خسته نباشید من وقتی تویserver.database  database Connection String را پاک کردم و Remove-database را نوشتم این ارور

 Remove-database : The term 'Remove-database' is not recognized as the name of a cmdlet, function, script file, or operable program. Check  

the spelling of the name, or if a path was included, verify that the path is correct and try again.

At line:1 char:1

+ Remove-database

+ ~~~~~~~~~~~~~~~

   + CategoryInfo          : ObjectNotFound: (Remove-database:String) [], CommandNotFoundException

   + FullyQualifiedErrorId : CommandNotFoundException را می دهد

1651

1 پاسخ
  • محمد اشرافی20 اسفند ۱۴۰۰

    سلام ، Remove-database توی ef core نداریم اگر میخواید دیتابیس رو پاک کنید باید از drop استفاده کنید 

    لیست command های er core رو می تونید توی لینک زیر ببینید

    https://docs.microsoft.com/en-us/ef/core/cli/powershell#drop-database