Liu*_*eng 3 c# sqlite subsonic subsonic3
我遇到了一个问题:在运行基于SQLite提供程序的SubSonic.Examples.SimpleRepo项目时,无法将类型为"System.Int64"的对象转换为类型"System.Int32".
我喜欢表类别列CategoryID的数据类型是' 整数 ',而SQLite中的'整数'将作为Int64返回,同时ClassID中的CategoryID数据类型为int,发生上述错误.
我检查了SubSonic的源代码:\ SubSonic.Core\SQLGeneration\Schema\SQLiteSchema.cs并找到以下代码:
else if (column.IsPrimaryKey && column.DataType == DbType.Int32
|| column.IsPrimaryKey && column.DataType == DbType.Int16
|| column.IsPrimaryKey && column.DataType == DbType.Int64
)
sb.Append(" integer ");
Run Code Online (Sandbox Code Playgroud)
谁能告诉我这些代码的目的?如何解决数据类型转换错误?
| 归档时间: |
|
| 查看次数: |
8574 次 |
| 最近记录: |