Entity Framework 6 - Does not create tables when enabling Migrations

前端 未结 4 1748
生来不讨喜
生来不讨喜 2021-01-05 10:13

In my application I enable Code First Migrations with some migrations, Also I use SQL Server Compact for integration test.

When I run my tests, Entity Framework crea

4条回答
  •  青春惊慌失措
    2021-01-05 10:40

    It does happens when adding model and running add-migration command.

    Here is the simplest cause of this issue:

    Add a newly added model property into IdentityDbContex class.

    Here are the steps:

    1. create model
    2. add property into IdentityDbContex class
    3. run add-migration
    4. update-database

提交回复
热议问题