有什么不对的LINQ to SQL? [英] What's wrong with Linq to SQL?

查看:174
本文介绍了有什么不对的LINQ to SQL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么不对的LINQ to SQL?

What's wrong with Linq to SQL?

或者 - 怎么样的LINQ to SQL会使它不适合一个项目,无论是新的或现有的?我想听听你为什么会不会选择LINQ to SQL的特定项目 - 包括哪些项目参数使其不适合

Or - what about Linq to SQL would make it unsuitable for a project, either new or existing? I want to hear about why you would not choose Linq to SQL for a particular project - including what project parameters make it unsuitable.

推荐答案

这不是很适应变化中的数据库模式。你必须重建的dbml层和重新生成数据的上下文。

It is not very adaptable to changes in the database schema. You have to rebuild the dbml layer and regenerate your data contexts.

像任何ORM(我没有进入辩论是否是一个ORM与否),你就必须要知道正在发生什么SQL,以及如何将影响您的来电。

Like any ORM (I am not getting into the debate as to whether it is an ORM or not), you do have to be aware what SQL is being generated, and how that will influence your calls.

插入不批,这样可高性价比的性能。

Inserts are not batched, so can be high cost in performance.

它被sunsetted有利于实体框架

It's being sunsetted in favour of Entity Framework

尽管它是使用一个提供者模型,将允许提供商来为其他DBMS平台建的事实,仅支持SQL Server中。

Despite the fact it is using a provider model that will allow providers to be built for other DBMS platforms, only SQL Server is supported.

[修改 @ AugustLights - 以我的经验:]延迟加载的可以的采取一些黑客获得工作

[EDIT @ AugustLights - In my experience: ] Lazy loading may take a bit of hacking to get working.

话虽这么说,我认为,如果正确地使用它是非常方便的。

That being said, I think it it is very handy if used correctly

这篇关于有什么不对的LINQ to SQL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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