gpt4 book ai didi

entity-framework - 从 Entity Framework 模型构建数据库模式

转载 作者:行者123 更新时间:2023-12-04 08:28:47 24 4
gpt4 key购买 nike

我看到 EF 可以根据现有数据库架构更新模型。但是,我完全是从头开始的;我不想构建表,然后在 EF 模型文件中重建它们。有没有一种方法可以提取模型文件,并自动为我创建 SQL 表?

最佳答案

不幸的是,您必须等待 EF 的第 2 版。

Here is a link到 EF 团队的博客,他们在那里谈论在 v2 中添加 Model First 支持:

One of the most painful omissions from the Entity Framework V1 was Model First, which basically means creating a conceptual 'model first' and then deriving a storage model, database and mappings from that.

[...]

The next release of the Entity Framework will include the ability to generate database schemas from your model. The main entry point into this feature is via the Designer context menu, to which we will add a new option called “Create Database from Model”.

关于entity-framework - 从 Entity Framework 模型构建数据库模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/293631/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com