Updating Entity Framework Model

前端 未结 6 2185
悲&欢浪女
悲&欢浪女 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:00

    A lot of files in the EF model get f*****d. Removing and adding the entity was not enough. The entities was duplicated like table, table1, table_result, table1_result, table_result1, and so on... Model update was updating the duplicated references instead of the original.

    I have to open notepad and fix manually these files:

    EFModel.Context.cs
    EFModel.edxm
    

    And delete these files:

    obj\Debug\edmxResourcesToEmbed\MYEfModel.csdl
    obj\Debug\edmxResourcesToEmbed\MYEfModel.msl
    obj\Debug\edmxResourcesToEmbed\MYEfModel.ssdl
    

提交回复
热议问题