什么是最烦人的功能(或缺少的功能),你已经发现,在实体框架? [英] What is the most annoying feature (or lack of feature) you have found in the Entity Framework?

查看:146
本文介绍了什么是最烦人的功能(或缺少的功能),你已经发现,在实体框架?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始与实体框架。听起来不错。但我想知道我是否应该注意一些软弱的地方。什么经验呢?

I am starting with the Entity Framework. It sounds great. But I am wondering if I should watch out for some weakness somewhere. Any experience there?

推荐答案

您可能需要启动prefixing你正在谈论的版本这些问题。该烦恼的一个良好的金额已经固定在即将到来的版本,在.NET 4.0中。

You probably need to start prefixing these questions with the version you are talking about. A good amount of the annoyances have been fixed in the upcoming version in .NET 4.0.

下面是什么,我会说使用SQL 2K8一个体面的大小DB(40 +表,有近100万行的几个表,交通体面量)约6个月的工作与第一个版本后,

Here is what I would say after working with the first version for about 6 months using a decent size DB in sql 2k8(40+ tables, several tables with close to 1M rows, and decent amount of traffic)

  • 缺乏外键的属性。这意味着如果我想知道或有相关的表我必须加载实际的实体仅仅是ID工作。 (固定在下一版本)
  • 完全缺乏一个简单的外部联接类似的LINQ to SQL中使用的 DefaultIfEmpty 的时候了。修正了下一个版本。
  • 生成的SQL不理想这似乎也被固定在下一版本
  • 很难抽象从$ C $下的测试性,并在多层次的环境,使用,但它可以做到的。这也可以归类为POCO问题也得到了解决。
  • Lack of Foreign key properties. Meaning if I want to know or work with just the id of a related table I have to load the actual entity. (fixed in next version)
  • Utter lack of an easy outer join like linq to sql has when using DefaultIfEmpty. Fixed in next version.
  • Generated Sql is less than optimal This seems to be fixed in next version as well
  • Very difficult to abstract from your code for testability and for use in multi tiered environments, but it can be done. This can also be classified as the POCO problem that also has been resolved.

有更多,但这些都是我最的。

There are more, but these are my top ones.

总的来说,我会再次使用它,但如果你是从头开始,请保存自己的一些痛苦和等待最新的版本,或者你可以开始使用测试版。

Overall I would use it again, but if you are starting from scratch please save yourself some pain and wait for the latest version or start using the beta if you can.

这篇关于什么是最烦人的功能(或缺少的功能),你已经发现,在实体框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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