EntityFramework 6 使用注意事项汇总

1.Could not load type 'System.Data.Entity.Infrastructure.TableExistenceChecker' from assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

解决方案:项目中引用的ef版本和packages.config中版本不一致,以ackages.config中为准,用nuget更新;

2.System.InvalidOperationException:“No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'. Make

sure the provider is registered in the 'entityFramework' section of the application config file.

解决方案:EF的dll文件不在当前项目的bin文件夹下;

posted @ 2021-07-27 09:13  惠山脚下小学僧  阅读(165)  评论(0编辑  收藏  举报