我正在尝试在使用EntityFramework 6.0(也尝试过5.0)管理的SqLite下,在VS 2012(.NET 4.5)中创建C#应用程序。
我的步骤如下:
Install sqlite-netFx45-setup-bundle-x86-2012-1.0.85.0.exe from http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki
It installs components for VS2012
Create C# project
Using NuGet: Install-Package EntityFramework -Pre (it installs EF 6.0)
Create simple Sqlite DB with one table, which DDL is following:
CREATE TABLE MyTable ( Id INT PRIMARY KEY, Name1 TEXT, Name2 VARCHAR, Blob1 BLOB, Date1 DATE, Date2 DATETIME );
Add new item to project: ADO.NET Entity Data Model:
Database file mentioned above has been selected, connection string saved in config file
Table is visible in wizard dialog, so I'm checking it and clicking Finish button.
目标.NET Framework版本当前不支持数据类型'longchar';表'main.MyTable'中的列'Name1'被排除。
目标.NET Framework版本当前不支持数据类型'binary';表'main.MyTable'中的列'Blob1'被排除。
目标.NET Framework版本当前不支持数据类型'date';表'main.MyTable'中的列'Date1'被排除。
目标.NET Framework版本当前不支持数据类型'date';表'main.MyTable'中的列'Date2'被排除。
我感到非常惊讶,因为我之前已经使用过EF + Sqlite,但是使用了其他提供者(旧版1.0.66.0),并且没有遇到类型映射方面的问题。
您是否遇到过类似的问题?您知道如何解决这些问题吗?
最好的问候。