我该如何向我的同事解释 Linq to Sql 与实体框架不同以及 EF 并不“糟糕”?

发布于 2024-11-10 04:24:05 字数 1998 浏览 5 评论 0原文

这是一个有点奇怪的问题。但我厌倦了与同事进行某种类型的讨论。有人可以(我很绝望)给我一些技术支持吗?我试图忽略他的粗暴语言,但发现这很难。
人们还会继续这样的讨论吗?还是直接把它放在一边并说“无可奉告”之类的话更好?

我的看法:

  • EF 比 Linq to Sql 更重要
  • 我们的应用程序速度很慢,因为我们的团队缺乏知识和经验,而不是因为 EF 很“糟糕”,
  • 也许应用程序的类型(巨大的继承和递归结构)不适合与 EF 一起使用,
  • 在说话之前三思而后行,并记住自己的意见(至少几分钟)

(3:08:34 PM)TweeZz:它“快”,直到对象被保存到数据库
(3:08:45 PM) TweeZz:那么可能是因为这些对象被附加了?
(3:08:57 PM) TweeZz:直到我不点击按钮,它们才会分离?
(3:09:21 PM) TweeZz:需要双倍的时间 :(
(3:09:23 PM) 同事:在你点击按钮之前,他们与数据库没有任何关系,他们只是 POCO
(3:09:39 PM) TweeZz:所以可能有东西
(3:09:41 PM) 同事:然后它们被保存在数据库上并被跟踪
(3:09:43 PM) TweeZz:更改 tra
(3:09:44 PM) TweeZz: jj
(3:09:55 PM) 同事:但这就是我们从一开始就知道的
(3:09:57 PM)同事::)
(3:10:03 PM) 同事:还需要一些时间
(3:10:06 PM) TweeZz:jj 对这种差异有点惊讶
(3:10:13 PM) 同事:我只是希望 EF 不是那么糟糕:)
(3:10:13 PM) TweeZz:无论如何太慢了
(3:10:20 PM) TweeZz:没有评论;)
(3:10:31 PM) 同事:我希望它能做得更聪明
(3:10:45 PM) 同事:对我来说,它似乎比 linqToSql 更糟糕,但它应该是它的替代品
(3:10:56 PM) 同事:faaaar 更糟:)
(3:11:15 PM) TweeZz:再次,没有评论;)
(3:12:19 PM) 同事:myea,我选的
(3:12:22 PM) 同事:都怪我:)
(3:13:01 PM) TweeZz:你可以在这里讨论;)
(3:13:01 PM) TweeZz:实体框架与 LINQ to SQL
(3:13:07 PM) TweeZz:或发表问题
(3:13:12 PM) TweeZz:为什么 EF 很糟糕
(3:13:12 PM) TweeZz: ;)
(3:13:24 PM) 同事:我已经知道答案了;]
(3:13:26 PM) 同事:M$ :D
(3:13:52 PM) 同事:有些东西很好,为什么不放弃它,让我们做一些巨大而缓慢的事情
(3:13:54 PM) TweeZz:呵呵
(3:13:55 PM) 同事:vista :D
(3:17:24 PM) TweeZz:说真的,我会在 stackoverflow 上发布一个问题
(3:17:52 PM) TweeZz:我如何告诉我的同事 linq to sql 与实体框架不同并且 EF 并不“糟糕”
(3:18:18 PM) 同事:我什么时候说过linq to sql和EF一样了?
(3:18:30 PM) 同事:我不认为这是一样的,从来没有想过
(3:18:42 PM) 同事:afaik :D
(3:19:16 PM) TweeZz:然后你可以与社区讨论你的意见;)
(3:19:34 PM) 同事:thx ;]
(3:19:40 PM) 同事:你太有帮助了
(3:19:46 PM) TweeZz:这个怎么样?
(3:19:47 PM) TweeZz: 3:10:45 PM) 同事:对我来说,它似乎比 linqToSql 更糟糕,但它应该是它的替代品
(3:19:51 PM) TweeZz:我一个人对付不了你
(3:19:54 PM) TweeZz:我需要备份

This is a bit of a weird question. But I'm tired of having a certain type of discussions with a colleague of mine. Could someone PLEASE (I'm desparate) give me some technical backup on this? I'm trying to ignore his harsh language, but find that very hard.
Does one continue discussions like these? Or is it better just to leave it aside and say something like "no comment"?

How I see it:

  • EF is way more then Linq to Sql
  • Our application is slow, because our team lacks knowledge and experience, not because EF is 'shitty'
  • maybe the type of application (huge inheritance and recursive structures) is not made to be used with EF
  • think twice before you say something and REMEMBER your own opinion (at least for a few minutes)

(3:08:34 PM) TweeZz: it's "fast" until the object gets saved into db
(3:08:45 PM) TweeZz: so probably something with the fact that then those objects are attached?
(3:08:57 PM) TweeZz: and until I don't click the button they are detached?
(3:09:21 PM) TweeZz: takes double the time :(
(3:09:23 PM) colleague: until you click the button they dont have anything to do with database, they are just POCO
(3:09:39 PM) TweeZz: k so probably something there
(3:09:41 PM) colleague: then they get saved on db and get tracked
(3:09:43 PM) TweeZz: change tra
(3:09:44 PM) TweeZz: jj
(3:09:55 PM) colleague: but that's what we've known from the beginning
(3:09:57 PM) colleague: :)
(3:10:03 PM) colleague: it has to take some time
(3:10:06 PM) TweeZz: jj just a bit surprised about the difference
(3:10:13 PM) colleague: i just hoped that that EF isn't soooo shitty :)
(3:10:13 PM) TweeZz: anyhow it's too slow
(3:10:20 PM) TweeZz: no comment ;)
(3:10:31 PM) colleague: well i hoped it would do stuff more clever
(3:10:45 PM) colleague: to me it seems worse than linqToSql yet it should be a replacement for it
(3:10:56 PM) colleague: faaaar worse :)
(3:11:15 PM) TweeZz: again, no comment ;)
(3:12:19 PM) colleague: myea, i picked it
(3:12:22 PM) colleague: i'm to blame :)
(3:13:01 PM) TweeZz: you can discuss it here ;)
(3:13:01 PM) TweeZz: Entity Framework vs LINQ to SQL
(3:13:07 PM) TweeZz: or post a question
(3:13:12 PM) TweeZz: why does EF suck
(3:13:12 PM) TweeZz: ;)
(3:13:24 PM) colleague: i know answer to that already ;]
(3:13:26 PM) colleague: M$ :D
(3:13:52 PM) colleague: something is good so why not abandon it and let's do something huge and slow
(3:13:54 PM) TweeZz: hehe
(3:13:55 PM) colleague: vista :D
(3:17:24 PM) TweeZz: seriously I will post a question on stackoverflow
(3:17:52 PM) TweeZz: how do I tell my colleague that linq to sql is not the same as entity framework and that EF isn't "shitty"
(3:18:18 PM) colleague: when did i say that linq to sql is the same as EF?
(3:18:30 PM) colleague: i dont think that it's the same, never thought that
(3:18:42 PM) colleague: afaik :D
(3:19:16 PM) TweeZz: and then you can discuss your opinion with the community ;)
(3:19:34 PM) colleague: thx ;]
(3:19:40 PM) colleague: you're such a help
(3:19:46 PM) TweeZz: what about this?
(3:19:47 PM) TweeZz: 3:10:45 PM) colleague: to me it seems worse than linqToSql yet it should be a replacement for it
(3:19:51 PM) TweeZz: I can't handle you alone man
(3:19:54 PM) TweeZz: I need backup

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

神魇的王 2024-11-17 04:24:06

而不是向您的同事证明 EF 不差劲

您应该要求您的同事证明 EF 很糟糕不仅对您而言,而且对整个世界而言!

我需要那个前排座位!

Instead of proving EF is not shitty to your colleague.

You should ask your colleague to prove EF is shitty not only to you, but to the entire world!

I need front row seats for that one!!

故乡的云 2024-11-17 04:24:06
  1. EF 实现了工作单元模式、身份映射模式、存储库模式。
  2. EF 引入了另一个抽象级别来引入独立于数据库的 SQL。
  3. EF 支持 POCO 和自我跟踪。
  4. EF 简化了复杂的查询,而无需担心连接。
  5. EF 引入了导航属性的延迟加载和预先加载。
  6. EF 允许您修改对象并保留更改,当您调用保存更改时,它会将所有内容正确保存到数据库。
  7. EF 还支持数据注释验证。

如果你的同事不明白这些,那么我认为这只是浪费你的宝贵时间。

  1. EF implements unit of work pattern, identity map pattern, repository pattern.
  2. EF introduces one more abstraction level to introduce database independent SQL.
  3. EF supports POCO and Self Tracking.
  4. EF simplifies complex query without having to worry about joins.
  5. EF introduces lazy loading and eager loading of navigation properties.
  6. EF let's you modify objects and it preserves the changes and when you call save changes, it will save everything correctly to database.
  7. EF supports data annotation validation as well.

If your collegue does not understand any of this then I think it's just waste of your valuable time.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文