The property cannot be set to a byte value, you must set the property to a value not equal to int32 type

The database is in SQL Server 2005, and the data type of my column is defined as tinyint(I cannot change this type)

I created a model with a type Int32. The reading system reads this error.

The property cannot be set to a byte value, you must set the property to non-null of type int32

I ran into a similar problem for other types, then after checking the CLR for compliance, I fixed them. Now I have encountered this problem only in the case of tinyintand smallint.

+4
source share
2

SQL Server , TINYINT - 1 , .Net byte. SMALLINT - 2 , Int16 .Net.

, , .

+12

. int32 .

, .

+1

All Articles