What#39;s wrong with Linq to SQL?(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.
它正在被 Entity Framework 所取代
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 有什么问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Linq to SQL 有什么问题?


基础教程推荐
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01