Deploy Entity Framework Code First

后端 未结 2 471
无人及你
无人及你 2021-02-05 14:07

I guess I should have thought of this before I started my project but I have successfully built and tested a mini application using the code-first approach and I am ready to dep

2条回答
  •  鱼传尺愫
    2021-02-05 14:17

    Actually database initializer is only for development. Deploying such code to production is the best way to get some troubles. Code-first currently doesn't have any approach for database evolution so you must manually build change scripts to your database after new version. The easiest approach is using Database tools in VS Studio 2010 Premium and Ultimate. If you will have a database with the old schema and a database with the new schema and VS will prepare change script for you.

提交回复
热议问题