List<tblX> messages = (from x in db.tblX where x.msg_id == id_id
|| x.name == firstName select x).ToList();
的非空值我得到的错误:'tblX'上的属性'x'不能设置为'null'值。您必须将此属性设置为类型“的Int16”
The property 'x' on 'tblX' could not be set to a 'null' value. You must set this property to a non-null value of type 'Int16'.
我在DB msg_blocked一个属性,它可为空和整数。我知道我需要进行转换,但是我并没有在linq中使用它或需要它。
向您展示tblX类。 –
@Asif tblX位于.edmx文件中。 –
@Damith你认真吗? –