DW123

The property on could not be set to a 'Int16' value.You must set this property to a non-null value of type ‘Int32’.”

在vs2010 EF4中查询数据总是报错:

The property  on “XX” could not be set to a 'Int16' value. You must set this property to a non-null value of type ‘Int32’.”

原因及解决方法:实体对中的XX字段在数据库中的数据类型被设成了smallint型了,改成int后问题解决。

 

posted on 2013-10-12 11:57  fw123  阅读(1702)  评论(0编辑  收藏  举报

导航