时间:2021-07-01 10:21:17 帮助过:2人阅读
<entityFramework> <defaultConnectionFactorytype="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"> <parameters> <parameter value="v11.0" /> </parameters> </defaultConnectionFactory> </entityFramework>
修改为Sql Server
<entityFramework> <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"> <parameters> <parameter value="Data Source=.; Integrated Security=True; MultipleActiveResultSets=True" /> </parameters> </defaultConnectionFactory> </entityFramework>
接下来,在connectionstrings中配置SQLServer的连接字符串即可。
大功告成!
修改 EF的默认连接工厂为 Sql Server 而不是LocalDb
标签:com result ring nbsp 创建 src uri web tip