为什么"real"和"float"都被映射到"Single"而不是"Double"?

spr*_*y76 12 sqlite entity-framework

我在Model-First模式(= EDMX)中使用System.Data.SQLite 1.0.90与VS2013和EntityFramework 5.

我创建了一个包含表的新SQLite数据库:

CREATE TABLE [..]
  [Test1integer] integer,
  [Test2int] int,
  [Test3smallint] smallint,
  [Test4tinyint] tinyint,
  [Test5bigint] bigint,
  [Test6money] money,
  [Test7float] float,
  [Test8real] real,
  [Test9decimal] decimal,
  [Test10numeric18_5] numeric(18,5), [..]
Run Code Online (Sandbox Code Playgroud)

相关部分是Test7floatTest8real.

从数据库执行更新模型后... EDMX现在包含:

SSDL:

      <Property Name="Test1integer" Type="integer" />
      <Property Name="Test2int" Type="int" />
      <Property Name="Test3smallint" Type="smallint" />
      <Property Name="Test4tinyint" Type="tinyint" />
      <Property Name="Test5bigint" Type="integer" />
      <Property Name="Test6money" Type="decimal" Precision="53" Scale="0" />
      <Property Name="Test7float" Type="real" />
      <Property Name="Test8real" Type="real" />
      <Property Name="Test9decimal" Type="decimal" Precision="53" Scale="0" />
      <Property Name="Test10numeric18_5" Type="decimal" Precision="18" Scale="5" />
Run Code Online (Sandbox Code Playgroud)

相关部分是Test7floatTest8real.

CSDL:

      <Property Name="Test1integer" Type="Int64" />
      <Property Name="Test2int" Type="Int32" />
      <Property Name="Test3smallint" Type="Int16" />
      <Property Name="Test4tinyint" Type="Byte" />
      <Property Name="Test5bigint" Type="Int64" />
      <Property Name="Test6money" Type="Decimal" Precision="53" Scale="0" />
      <Property Name="Test7float" Type="Single" />
      <Property Name="Test8real" Type="Single" />
      <Property Name="Test9decimal" Type="Decimal" Precision="53" Scale="0" />
      <Property Name="Test10numeric18_5" Type="Decimal" Precision="18" Scale="5" />
Run Code Online (Sandbox Code Playgroud)

相关部分是Test7floatTest8real.

问题

Test7float 错误地变成了"真正的"+"单身" - 设计师也不允许"双重"在这里.

SQLite3文档(http://www.sqlite.org/datatype3.html)明确指出"real"是一个8字节的IEEE浮点数,而"float"只是"real"的同义词 - 所以每一个case"Double"(8字节)应优先于"Single"(4字节).

我做错了什么或者我误解了什么?如果不是:哪里出了问题,我该如何解决?

我应该为此创建错误报告吗?

小智 0

真正的sqllite数据类型实际上是一个float(http://www.sqlite.org/datatype3.html),对应的.Net框架类型是Single(http://msdn.microsoft.com/en-us/library/b1e65aza ) .aspx )