记录在ef6+sqlite开发中的坑
新手刚上路。
1。现象:建立好entity模型后,更改了数据库。尝试使用模型带的update,不起作用。
结果:试了很多办法后,发现update之后需要重新编译,模型中的代码才会改变。
2。现象:使用entity模型插入数据时报错。Unable to determine the provider name for provider factory of type 'System.Data.SQLite.SQLiteFactory'.
结果:在web.config中system.data节加入这一段。
<remove invariant="System.Data.SQLite" />
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite"/></span> <remove invariant="System.Data.SQLite.EF6" />

浙公网安备 33010602011771号