EF Data migrations won't detect changes when adding new migration

后端 未结 16 1937
情话喂你
情话喂你 2020-12-09 14:53

I am using Entity Framework 5.0 Data migrations along with code first. When i add a new field to my model and execute the following command in the package manager console.

16条回答
  •  一个人的身影
    2020-12-09 15:22

    Just got the same problem but figured out that my new field was added as a member variable and not a property - it was missing the {get; set;} part and that makes migration skip that field.

    May not be your case but it might help someone else.

提交回复
热议问题