[英]Npgsql + Entity Framework + Edmx with column type bit
I have been using Npgsql with Entity Framework + .net, while using column type as bit in the ssdl part of edmx file, its throwing an error like "The type bit is not a primitive type" .我一直在使用 Npgsql 和 Entity Framework + .net,同时在 edmx 文件的 ssdl 部分使用列类型作为位,它抛出一个错误,如“类型位不是原始类型”。
Can anyone tell me how to use bit type with edmx file.谁能告诉我如何在 edmx 文件中使用位类型。
Thanks.谢谢。
Did you use bit
for boolean types?您是否将
bit
用于布尔类型? If so, you need to change your bit
type to bool
in your database.如果是这样,您需要在数据库中将
bit
类型更改为bool
。
If not, you need to use smallint
in Entity Model.如果没有,则需要在实体模型中使用
smallint
。
可能是数据库不支持您要存储的某种数据类型。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.