从实体框架模型构建数据库架构

编程入门 行业动态 更新时间:2024-10-25 20:25:38
本文介绍了从实体框架模型构建数据库架构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我看到EF可以更新基于现有的数据库模式的典范。不过,我从头开始完全;我不想建表,然后重建的他们在EF模型文件。有没有办法,我可以绘制出一个模型文件,并自动为我创建的SQL表的方式吗?

I see that EF can update a model based on an existing database schema. However, I'm starting totally from scratch; I don't want to build tables, then rebuild them in the EF model file. Is there a way that I can draw out a model file, and have the SQL tables automatically be created for me?

推荐答案

不幸的是,你必须等待英法2.0版本。

Unfortunately, you have to wait for version 2 of EF.

这里是一个链接到EF团队的博客,在那里他们谈论V2加入模型优先支持:

Here is a link to the EF team's blog, where they talk about adding Model First support in v2:

从一个实体框架V1最痛苦的疏漏之处是模型首先,这基本上意味着第一模式创建一个概念,然后推导出存储模型,数据库和映射从。

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".

更多推荐

从实体框架模型构建数据库架构

本文发布于:2023-07-27 12:06:42,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1222351.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:实体   架构   框架   模型   数据库

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!