的code只有模型,实体框架4,产品优势? [英] Advantages of Code Only model in Entity Framework 4?

查看:118
本文介绍了的code只有模型,实体框架4,产品优势?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实体框架4.0期货preVIEW(CTP3现在)有一个code只建模范例为您的类型和数据库之间的映射。没有EDMX文件涉及,也没有EDM设计需要。

The Entity Framework 4.0 Futures preview (CTP3 now) has a code only modeling paradigm for mapping between your types and the database. No edmx files involved and no EDM designer needed.

我想知道什么是code仅与模型一大优势是什么? (;第一个数据库模型首先与AMP)有什么可以在$ C C $首先不能在其他车型做做什么?我想,也许更多的控制权,但我还是不能修改CSDL,SSDL,MSL文件和我自己的code得到我需要的结果。在code只有模型涉及尽一切code可能会有错误一样产生错误的期望的模型或丢失的财产定义。

I wanted to know what are the big advantages of Code Only vs Model First? What can be done in Code First which can't be done in other models (Model First & database first)? I am thinking maybe more control but I cant still modify the CSDL, SSDL, MSL files and my own code to get the result I need. The Code Only model involves doing everything in code which could be prone to errors like producing the wrong desired model or missing property definitions.

推荐答案

这是真正的preference的问题。引用的EF设计博客:

It is really a matter of preference. Quoting the EF design blog:

然而,许多开发人员查看他们的   code为榜样。

However many developers view their Code as their model.

在理想情况下,这些开发商只是想   写一些域类和无   曾经接触一个设计师或一块   XML能够使用这些类与   实体框架。基本上他们   想写'code只有'。

Ideally these developers just want to write some Domain classes and without ever touching a designer or a piece of XML be able to use those classes with the Entity Framework. Basically they want to write 'Code Only'.

的http://博客.msdn.com / B / efdesign /存档/ 2009/06/10 / code-only.aspx

这篇关于的code只有模型,实体框架4,产品优势?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆