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

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

本文介绍了从实体框架模型构建数据库模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到,EF可以根据现有的数据库模式来更新模型。但是,我从头开始,我不想在EF模型文件中构建表格,然后重新构建它们。有没有办法我可以绘出一个模型文件,并自动为我创建SQL表?

解决方案

不幸的是,你必须等待EF的版本2。



,他们谈论在v2中添加Model First支持:


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?

解决方案

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

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

这篇关于从实体框架模型构建数据库模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 14:37