C# – Updating Entity Framework Model

centity-frameworklinq-to-entitiessql-server-2008visual studio 2010

I have just started using EF and found it cool, but I ran into a problem,

Problem:
I changed my DB schema of a column inside the table User, It was Varbinary(50) previously I then changed it into VarChar(50), and then inside the MyModel.edmx designer I chose "Update model from database", after clicking finish I received this error.

Error:

   Error 2019: Member Mapping specified is not valid.
    The type 'Edm.Binary [Nullable=False,DefaultValue=,MaxLength=100,FixedLength=False]' of member
   'Email' in type 'LearnDBModel.User' is not compatible with SqlServer.varchar 
    [Nullable=False,DefaultValue=, MaxLength=50,Unicode=False,FixedLength=False]' of member 'Email'
    in type 'LearnDBModel.Store.User'.

Let me know how to fix it

Best Answer

I've run into similar issues before, and found that the way to solve it was to delete the table from the model. Save and close the model. Then reopen the model and re-add the table.