简体   繁体   English

将列/属性添加到现有的实体框架模型

[英]Add columns/properties to existing Entity Framework Model

I'm building an application that will be exposed to the public. 我正在构建一个将向公众公开的应用程序。 So the database will be filled with data. 因此数据库将充满数据。 I'm not sure how to extend the model afterwards. 我不确定以后如何扩展模型。 Locally after any changes of the model the database get's recreated. 在对模型进行任何更改后,将在本地重新创建数据库。 How can add properties to the existing model, without recreate the entire database ? 如何在不重新创建整个数据库的情况下向现有模型添加属性?

Take a look at EntityFramework CodeFirst Migration, for modifying your schema. 查看EntityFramework CodeFirst Migration,用于修改架构。

MSDN Link for Migrations MSDN迁移链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM