How to initializing the code-first Entity Framework database in an Azure Mobile Services project

后端 未结 3 933
南方客
南方客 2020-12-11 07:50

I am utterly confused by the use of Entity Frameworks code-first migrations within Azure Mobile Services.

I\'m following the article How to make data model changes t

3条回答
  •  时光取名叫无心
    2020-12-11 08:32

    I just tested this and I also get this error when using Update-Database in PMC.

    I'm using Azure Mobile Apps, not Services, but it's the same Entity-Data.

    Starting from an empty table, what works for me is just having an Initial Migration file, a Configuration.cs and the MigrateDatabaseToLatestVersion bit. Then you can just run the application with F5 instead of Update-Database.

    It should create your schema along with your seed.

提交回复
热议问题