是sql更好还是linq更好用于数据访问 [英] Is sql better or linq is better for data access

查看:62
本文介绍了是sql更好还是linq更好用于数据访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

哪个更适合数据访问linq或sql

解决方案

这并不是一个人可以按原样回答的问题:它们不是那个可比的.

Linq不仅可以访问SQL,而且还可以访问更多的数据源,但是还附带学习曲线.这就像将火车与福特Ka进行比较-它们在从A到B的过程中都做相同的工作,但是它们以完全不同的方式来做.


我认为类似于c vs c#,如果您对内存和性能有所了解,那么sql优于linq,其他方面linq则更好,因为它具有良好的代码可读性,并且易于在列表和可枚举对象上使用相同的模式.


which one is better for data access linq or sql

解决方案

That isn''t really a question anyone can answer as is: they aren''t that comparable.

Linq is capable of accessing more datasources than just SQL, but there is a learning curve attached. It''s like comparing a train with a Ford Ka - they both do the same job in that they go from A to B, but they do it in totally different ways.


i think similar like c vs c# if you are conscious about memory and performance then sql is better than linq other wise linq is better just code readability and easy to use with same pattern on list and enumerable objects.


这篇关于是sql更好还是linq更好用于数据访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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