My Entity Data Model is giving me this error:
Error 2019: Member Mapping specified is not valid. The type 'Edm.Int16[Nullable=True,DefaultValue=]' of ... is not compatible with 'SqlServer.tinyint[Nullable=True,DefaultValue=]' of ...
I've tried deleting and recreating the property. I don't know what I've done wrong.
If you include 2 or 3, you have to use tinyint (at the very smallest scale). "For example, it's better to use tinyint when you know that the only data you will store is a 1, 0 or null (with a very small chance of expanding that to a 2 or 3 later)." I'd use an ENUM for such a thing.
The TINYINT data type is an integer value from 0 to 255. TINYINT is the smallest integer data type and only uses 1 byte of storage. An example usage of TINYINT is a person's age since no person reaches the age of 255.
Int16 struct. It is signed and takes 16 bits. It has minimum -32768 and maximum +32767 capacity.
A tinyint
should get mapped to a .NET byte
; Int16
should be the corresponding type for a smallint
in SQL.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With