Entity Framework code first migrations throwing error

后端 未结 9 1639
再見小時候
再見小時候 2021-02-13 20:17

Here is what I did before I got this error:

  1. Installed EF (the pre release version, 6 maybe, I dunno)
  2. decided I did not want, so uninstalled that and reins
9条回答
  •  遇见更好的自我
    2021-02-13 20:45

    Perform the following actions to resolve this issue:

    1)Uninstall Entity Framework from the package(Manage NUGET Packages).

    2)Restart Visual Studio.

    3)Re-install Entity Framework again from package manager.

    4)Add reference to the System.Data.Entity.

    5)Run the command in package manager console Enable-Migrations -ContextTypeName Movie.Models.MovieDBContext(This is a sample context).

    After this you could see the changes reflected in packages.config.

提交回复
热议问题