Я получаю следующие ошибки при генерации миграции базы данных: -
Командная строка: -
C:Shop\eWebShop\Web>dotnet ef migrations add "InitialDatabase" --context WebContext -p ../Persistence/Persistence.csproj -o Data/Migrations
Ошибка: -
Unable to create an object of type 'WebContext'. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728
Пробовал через консоль диспетчера пакетов: -
Команда: -
Add-Migration InitialDatabase -Context WebContext -p Persistence -o Data/Migrations
Ошибка: -
Add-Migration : The term 'Add-Migration' 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
+ Add-Migration InitialDatabase -Context WebContext -p Persistence -o D ...
+ ~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Add-Migration:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException