多么成熟&实体框架是代码优先库吗? [英] How mature & felxible is the Entity Framework's code-first library?

查看:239
本文介绍了多么成熟&实体框架是代码优先库吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在准备好使用EF Code-first方法做一个小型,简短的架构尖峰,由Scott Gu 这里 here 。在我做之前,我想知道这是否值得。目前我有一个使用EF POCO生成模板的项目,我想调查我可以从域模型切换到更纯粹的POCO策略的优势。特别是,这些是我感兴趣的东西:

I'm getting ready to do a small, brief architecture spike using the EF code-first approach, introduced by Scott Gu here and here. Before I do, I'd like to know whether it will be worth it. Currently I have a project that uses the EF POCO Generation template, and I'd like to investigate the advantages I can get out of switching to a more pure POCO strategy for the domain model. Particularly, these are the things I'm interested in:


  1. 避免使用收集修复方法自动生成的部分类,并且能够专注于必要的域对象代码,而不用担心关联持久性。

  1. Avoiding automatically-generated partial classes with collection fixup methods, and being able to concentrate on essential domain object code without worrying about association persistence.

避免每次要将模型添加到模型时转换模板。

Avoiding having to transform templates every time I want to add an artifact to the model.

仍然能够对表持久性的策略(ComplextTypes,每个类型的表与每个层次等的位置)进行一些控制, 。这些并不像其他2个问题那么重要。

Still being able to have some control over the strategy of table persistence (locations of ComplextTypes, table-per-type versus table-per-hierarchy, etc). These aren't as important as the other 2 concerns.

可以找到的最新版本是2010年夏季发布的CTP4。这是最新的版本?

The most recent version I could find of this was the CTP4, released summer 2010. Is this the most current version?

使用这个特定的图书馆,选择这种方法有哪些缺点?你可以推荐任何其他的问题,我应该调查的尖峰?

What are the cons of choosing this approach, using this particular library? Can you recommend any other concerns I should investigate in the spike?

推荐答案

通过

Go through these tutorials and check this blog about some additional topics like inheritance - it will give you pretty good overview of Code First in CTP5 which should be close to final version as stated here:


CTP5将是Code
的最终预览首先和简化API表面
(DbContext),之前我们提供了一个完整的
支持的生产就绪版本
2011年Q1。

CTP5 will be our final preview of Code First and the simplified API surface (DbContext) before we offer a full supported production ready release in Q1 of 2011.


$ b $我认为你提到的所有三点都满足现在的版本。

I think all three points you mentioned are satisfied by current version.

这篇关于多么成熟&实体框架是代码优先库吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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