LINQ在n层应用程序中有哪些优势? [英] What are the advantages of LINQ in n-tier applications ?

查看:67
本文介绍了LINQ在n层应用程序中有哪些优势?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用LINQ.
现在,我在应用程序中使用存储过程和一般查询.
任何人都可以解释一下LINQ的优点吗?

I want to use LINQ.
Now I am using Stored Procedures and General Queries in my applications.
Can any body explain , what are advantages of LINQ ?

推荐答案

每个新事物都有其优点和缺点.这是 Microsoft Social MSDN [ http://techieideas.blogspot.com/2010/02/advantages- and-disadvantages-of-linq.html [ ^ ]
2. http://stackoverflow.com/questions/14530/linq-to-sql- vs-stored-procedures [ ^ ]
3. http://stackoverflow. com/questions/2259894/what-are-the-advantages-or-disadvantages-of-using-dbml-for-linq2sql-查询 [
Every new thing comes with some advantages and some disadvantages. Here is a quick list of LINQ from Microsoft Social MSDN[^]

Advantages
1. Quick turn around for development
2. Queries can be dynamically
3. Tables are automatically created into class
4. Columns are automatically created into properties
5. Relationship are automatically appeaded to classes
6. Lambda expressions are awesome
7. Data is easy to setup and use

Disadvantages
1. No clear outline for Tiers
2. No good way of view permissions
3. Small data sets will take longer to build the query than execute
4. There is an overhead for creating queries
5. When queries are moved from sql to application side, joins are very slow
DBML concurrency issues
6. Hard to understand advance queries using Expressions

Check out :
1. http://techieideas.blogspot.com/2010/02/advantages-and-disadvantages-of-linq.html[^]
2. http://stackoverflow.com/questions/14530/linq-to-sql-vs-stored-procedures[^]
3. http://stackoverflow.com/questions/2259894/what-are-the-advantages-or-disadvantages-of-using-dbml-for-linq2sql-queries[^]

Hope this helps.
All the best.


回复此
http://msdn.microsoft.com/en-us/library/bb655883 (v = vs.90).aspx [
Reffer this
http://msdn.microsoft.com/en-us/library/bb655883(v=vs.90).aspx[^]


这篇关于LINQ在n层应用程序中有哪些优势?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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