[英]The type or namespace name 'SqlServer' does not exist in the namespace 'Microsoft.EntityFrameworkCore'
I am trying to configure my .NET Core Entity Framework app to use SQL Server, but I can't seem to access the namespace. 我试图将.NET Core Entity Framework应用程序配置为使用SQL Server,但似乎无法访问名称空间。
Startup.cs (origin of the error) Startup.cs(错误来源)
using Microsoft.EntityFrameworkCore.SqlServer;
Project.json Project.json
"dependencies": {
"Microsoft.EntityFrameworkCore.SqlServer": "1.1.0"
}
I have run dotnet restore
successfully. 我已成功运行dotnet restore
。
If anyone could point me in the right direction that would be lovely. 如果有人能指出我正确的方向,那就太好了。
That's because there is no namespace "Microsoft.EntityFrameworkCore.SqlServer". 这是因为没有命名空间“ Microsoft.EntityFrameworkCore.SqlServer”。 Everything related to SQL Server is in the "Microsoft.EntityFrameworkCore" namespace. 与SQL Server相关的所有内容都在“ Microsoft.EntityFrameworkCore”命名空间中。 See for yourself: https://github.com/aspnet/EntityFramework/tree/dev/src/Microsoft.EntityFrameworkCore.SqlServer . 自己看看: https : //github.com/aspnet/EntityFramework/tree/dev/src/Microsoft.EntityFrameworkCore.SqlServer 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.