我想尝试学习在我的 asp.net core 应用程序中使用 EF Core。
我很困惑很多可用的东西之间有什么区别,希望有人可以解释这些差异:
- 我一直在使用 VS 的 GUI Packager Manager,但似乎至少还有三个控制台,有什么区别?这些描述并没有多大帮助,因为所有这些描述的介绍性句子几乎都是相同的...... PMC NUGET CLI dotnet CLI
都是用来安装的NuGet 包。太棒了...
- 这里命令dotnet工具install --global dotnet-ef 使用并标记为 .NET CLI,但在我的教程中它实际上是从 PCM 执行的!此外,这些工具安装在 C:\Users\USER_DIR.dotnet\tools 中,据我了解,这与安装在 VS 项目内的 nuget 包无关?!
结果:
- 但是这些是什么?
JFF 我尝试将“dotnet-ef”添加到我的 .NET Core 6 项目中,但收到一条错误,表明仅支持 Core 3.1。
无论如何,我现在很困惑。我认为工具是全局的(或路径本地的),而 NuGet 包是项目中的附加 .dll。这是真的吗?如果是这样,为什么 EF Core 工具有两种变体?
我知道我需要这些来将 EF .dll 添加到我的项目
- Microsoft.EntityFrameworkCore.SqlServer (如果这是所选的服务器)
- Microsoft.EntityFrameworkCore (这是硬要求吗?)
- Microsoft.EntityFrameworkCore.Design (sais microsoft)
但我不明白 nuget 版本是什么这些工具是为了。谢谢...
I wanted to try and learn using EF Core with my asp.net core apps.
I am very confused what's the difference between a lot of the stuff that's available and hope somebody can explain the differences:
- I have been using the GUI Packager Manager for VS a lot, but there seem to be at least THREE more consoles, what's the difference? The descriptions didn't help very much, since the introductory sentence on all of them is pretty much the same... PMC NUGET CLI dotnet CLI
They are all used to install NuGet Packages. Great...
- Here the command dotnet tool install --global dotnet-ef is used and labeled .NET CLI, but in my tutorial it is actually executed from the PCM! In addition the tools then are installed in C:\Users\USER_DIR.dotnet\tools which to my understanding has NOTHING to do with a nuget package that is installed inside a VS PROJECT ?!
Result:
- But then what are these?
JFF I tried the adding the "dotnet-ef" one to my .NET Core 6 project and I got an error that only Core 3.1 is supported for this.
In any case I'm confused now. I thought tools are global (or path-local) and NuGet Packages are additional .dlls inside your project. Is that true? And if so, how come, that the EF Core tools come in both variants?
I understand I need those to add the EF .dlls to my project
- Microsoft.EntityFrameworkCore.SqlServer (if this is the chosen server)
- Microsoft.EntityFrameworkCore (is this hard req?)
- Microsoft.EntityFrameworkCore.Design (sais microsoft)
But I don't understand what the nuget version of the tools is for. Thanks...
发布评论
评论(1)
应用。
除非您相信作者。
.NET是通过快照安装的。
来源:如何管理.net工具
application.
unless you trust the author.
.NET was installed via Snap.
Source: How to Manage .Net Tools