Cyb*_*Ego 2 powershell visual-studio nuget-cli package-manager-console
PM> get-help entityframework
Run Code Online (Sandbox Code Playgroud)
get-help :未将对象引用设置为对象的实例。
在第 1 行:1 个字符:1
+ 获取帮助实体框架
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo :未指定:(:) [获取帮助] ,NullReferenceException
+ FullQualifiedErrorId:System.NullReferenceException,Microsoft.PowerShell.Commands.GetHelpCommand
我猜这可能是与PowerShell相关的问题,所以我在这里列出了它的版本号
PM> $PSVersionTable.PSVersion
Major Minor Build Revision
----- ----- ----- --------
5 0 10586 494
Run Code Online (Sandbox Code Playgroud)
我正在使用
Microsoft Visual Studio Community 2017
Version 15.8.7
Run Code Online (Sandbox Code Playgroud)
一旦我安装了 NuGet 包 Microsoft.EntityFrameworkCore.Tools,错误就消失了,我看到了我的列表......
PM> 获取帮助实体框架
_/\__
---==/ \\
___ ___ |. \|\
| __|| __| | ) \\\
| _| | _| \_/ | //|\\
|___||_| / \\\/\\
Run Code Online (Sandbox Code Playgroud)
主题 about_EntityFrameworkCore
简短说明 提供有关 Entity Framework Core 包管理器控制台工具的信息。
详细说明 本主题介绍 Entity Framework Core 包管理器控制台工具。有关 Entity Framework Core 的信息,请参阅https://docs.efproject.net 。
The following Entity Framework Core commands are available.
Cmdlet Description
-------------------------- ---------------------------------------------------
Add-Migration Adds a new migration.
Drop-Database Drops the database.
Get-DbContext Gets information about a DbContext type.
Remove-Migration Removes the last migration.
Scaffold-DbContext Scaffolds a DbContext and entity types for a database.
Script-DbContext Generates a SQL script from the current DbContext.
Script-Migration Generates a SQL script from migrations.
Update-Database Updates the database to a specified migration.
Run Code Online (Sandbox Code Playgroud)
另请参见 添加迁移 删除数据库 Get-DbContext 删除迁移支架-DbContext 脚本-DbContext 脚本-迁移 更新数据库
| 归档时间: |
|
| 查看次数: |
4219 次 |
| 最近记录: |