我使用实体框架4码第一种方法来自动创建SQLite数据库,我得到一个错误,告诉我ProviderIncompatibleException:实体框架4不支持的SQLite
[System.Data.ProviderIncompatibleException] = {"CreateDatabase is not supported by the provider."}
我thaught EF 4支持呢?
我在app.config中使用此:
<system.data>
<DbProviderFactories>
<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, Version=1.0.81.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139" />
</DbProviderFactories>
</system.data>
谢谢。
你看看这个线程似乎回答你的问题? http://stackoverflow.com/a/8522174/325521 – Shiva