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文件夾下;

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章