40

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 Answer 1

82

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

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks. I was working with a tinyint but thinking of a smallint.
It also works with byte for tinyint and short for smallint.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.