SQL Server tinyint to Int16 Entity Framework Mapping

entity-framework sql-server types

Question

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.

1
35
5/2/2011 10:28:07 PM

Accepted Answer

A tinyint should get mapped to a .NET byte; Int16 should be the corresponding type for a smallint in SQL.

73
4/10/2017 6:12:03 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow