Updating entity framework model after changing the data type of column in database table

entity-framework-6 mapping member sqldatatypes updatemodel

Question

I am working with entity framework 6 with database 1st approach. I changed the datatype of my columns in the table and after updating my model I got the following error:

Error 1 Error 2019: Member Mapping specified is not valid. The type 'Edm.Int32[Nullable=False,DefaultValue=]' of member 'Warranty' in type 'pjModel.Bill' is not compatible with 'SqlServer.nvarchar[Nullable=False,DefaultValue=,MaxLength=50,Unicode=True,FixedLength=False]' of member 'Warranty' in type 'pjModel.Store.Bills'.

what I understand that there is some compatibility issue between datatypes of framework and sql server. Also when I opened the .edmx file with XML viewer, it clearly shows that changes are propagated in the model i.e data type has been updated, but in the diagram view when I right click the particular column it still shows the old datatype.

I can provide more information if required.

1
0
8/18/2018 3:24:07 PM

Popular Answer

The issue has been resolved. I manually change the type from the diagram view and then it get mapped with the model class.

0
8/18/2018 5:46:23 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