Updating Entity Framework Model

前端 未结 6 2139
悲&欢浪女
悲&欢浪女 2020-12-31 00:20

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

6条回答
  •  长发绾君心
    2020-12-31 01:11

    Shawn de Wet's solution works fine but In case you dont want to remove the table (for example relationship to some other tables..) you can use another solution: Open your edmx file with xml Editor, Ctrl + F to find a line similar to

    Property Name="Email" Type="Binary" Nullable="false" MaxLength="50" FixedLength="false"

    Update it to:

    Property Name="Email" Type="String" Nullable="false" MaxLength="50" Unicode="false" FixedLength="false"

    Save it and rebuild.

提交回复
热议问题