惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
博客园 - Franky
GbyAI
GbyAI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
爱范儿
爱范儿
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
博客园_首页
MongoDB | Blog
MongoDB | Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recent Announcements
Recent Announcements
Scott Helme
Scott Helme
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
C
CERT Recently Published Vulnerability Notes
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Jina AI
Jina AI
F
Fortinet All Blogs
N
Netflix TechBlog - Medium
L
LangChain Blog
L
LINUX DO - 最新话题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Hacker News: Front Page
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
AI
AI
T
Troy Hunt's Blog
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
S
Secure Thoughts
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
S
Security @ Cisco Blogs
Cloudbric
Cloudbric
E
Exploit-DB.com RSS Feed
Attack and Defense Labs
Attack and Defense Labs

博客园 - lovecherry

Java避坑宝典《Java业务开发常见错误100例》上线了 招聘前端、Java后端开发、测试、Mysql DBA 我的另一个博客 一个MVC框架的原型 有关网站UI实现的几种方式的讨论 httpmodule和httphandler配合的又一应用——合并脚本样式 - lovecherry - 博客园 如何把ASP.NET TRACE HANDLER的信息持久化保存 .NET 4.0改进(一) 到底怎么样的面试才是最公平的才能找到合适的人又不产生误判 最近项目的一些心得(纯贴代码) 有关CPU占用和缓存的一些见解,希望给大家一些启发 没有linq让我怎么活 2005-2008年度个人总结和写书计划? SOA概念误解实施要点 我对SOA的认识以及心得 MCTS Self-Paced Training Kit (Exam 70-503) Microsoft® .NET Framework 3.5—Windows® Communication Foundation 书评 【翻译】微软应用程序架构指南:如何组织应用程序的结构 代朋友发招聘信息,C++程序员 有关写书。。。。。。。。。。。
ADO.NET EF不方便之处(BUG)收集帖
lovecherry · 2009-01-15 · via 博客园 - lovecherry

考虑在项目中使用ADO.NET EF,但是怎么都用不顺手,甚至比L2S少了很多关键功能。

我先列几个让我很郁闷的(只用了不到5小时就遇到这么多问题):

1)存储过程自动封装是一个很常用的功能,在ADO.NET EF中可以和L2S一样对基本的INSERT/UPDATE/DELETE映射存储过程。

也可以对存储过程自动封装,把返回值是结果集的存储过程和实体进行关联,但是很吃惊的是:

     a) 设计器并没有提供对返回值不是实体(比如无返回值和标量返回值)的存储过程的自动生成,http://blogs.msdn.com/adonet/archive/2008/12/02/migrating-from-linq-to-sql-to-the-entity-framework-stored-procedures-for-data-retrieval.aspx 一文中一段

The LINQ to SQL Designer allows you to map stored procedures that return scalars. While the Entity Framework does have mapping support to specify stored procedures and functions that return scalars, automatic code-generation of methods that will allow you to use the mapping is currently missing. However, this is something that is being strongly considered for the next release of Entity Framework.

     b) 并不支持自定义实体的自动生成:

The Entity Framework does not automatically create return types whilst mapping stored procedures into functions.

It is possible to create the types by hand and to write additional code to execute the stored procedure and materialize the results.

2) 设计器不支持从领域模型直接生成数据库结构

3) UPDATE MODEL FROM DATABASE这个功能特别不方便,有的时候会重复生成关系

4) 没有提供LOG功能

 来看看老外的2个文章:

http://reddnet.net/code/ado-net-entity-framework-impressive-powerful-useless/

 The new Microsoft Entity Framework is the latest in a long line of very impressive, yet tragic failures in Microsoft's data access strategy...

这个开场白很寒,文中提到了延迟加载的问题,这位兄弟还是相当激动的。

http://www.kindblad.com/2009/01/11/why-you-should-not-use-the-adonet-entity-framework/

此文中也提到了我说的存储过程和更新模型的问题。

http://blogs.msdn.com/timmall/archive/2008/06/24/vote-of-no-confidence.aspx

此文是官方对社区反馈的一些解释。据说会在将来版本中改进下列方面:

1) 自定义POCO->EDM

2) EDM->关系型DB

3) 隐式延迟加载

4) 持久化透明

请大家补充,我都在想是不是放弃ADO.NET EF而使用SUBSONIC/L2S/NHIBERNATE等了。。。我的想法是不管是什么框架还是工具,易用性是第一的,让我们期待ADO.NET EF1.1/2.0!传说微软的东西不到2.0/3.0别去用?