排名
6
文章
6
粉丝
16
评论
8
{{item.articleTitle}}
{{item.blogName}} : {{item.content}}
ICP备案 :渝ICP备18016597号-1
网站信息:2018-2025TNBLOG.NET
技术交流:群号656732739
联系我们:contact@tnblog.net
公网安备:
50010702506256


欢迎加群交流技术

ef的核心安装,一般使用code first什么的只需要这一个就可以了
Install-Package Microsoft.EntityFrameworkCore.SqlServer -version 3.1.1
其他的例如db first需要的工具什么的,或者code first的数据库迁移
Install-Package Microsoft.EntityFrameworkCore.Tools -version 3.1.1 Install-Package Microsoft.EntityFrameworkCore.Design -version 3.1.1
或者ItemGroup里边
<ItemGroup> <PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="2.2.0" /> <PackageReference Include="Microsoft.AspNetCore.Session" Version="2.2.0" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.10" /> <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.10" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.10"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> </PackageReference> <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.4" /> <PackageReference Include="Newtonsoft.Json" Version="12.0.3" /> </ItemGroup>
注意ef core5.0版本的,没有UseSqlServer这个方法了
欢迎加群讨论技术,1群:677373950(满了,可以加,但通过不了),2群:656732739。有需要软件开发,或者学习软件技术的朋友可以和我联系~(Q:815170684)
评价