Reason not to use LINQ and reason to use

1). Are there any good Reasons not to use LINQ in my projcts? We use .Net 3.5 and VSTO 3.0.

http://stackoverflow.com/questions/1576679/reason-not-to-use-linq

2.When to use LINQ in your design?

http://social.msdn.microsoft.com/Forums/en-US/linqprojectgeneral/thread/bc7e7120-7fe2-4e36-b8b4-9dcce26e9ef4/

3. Is it a good choice to not use LINQ sometimes?

http://social.msdn.microsoft.com/forums/en-us/linqprojectgeneral/thread/9D47D67B-0988-42AB-ADE7-8C3F799FC7B9

 4.Beginners should not use LINQ

http://blogs.msdn.com/b/cellfish/archive/2008/10/17/beginners-should-not-use-linq.aspx

The reason not to use Linq

-------------------------------------------------------------------------------------------------------------------

1). LINQ works great in most cases, but when you want to build complex queries (e.g. in reporting apps) it's statically-typed nature becomes a disadvantage. It's hard to, for instance, conditionally JOIN, or conditionally GROUP BY, because the result type changes, even if in the end you want to project the same fields. It's also hard to do LEFT JOIN. If you really appreciate dynamic queries then SQL and ESQL are better options.

2). Also, the same LINQ query can be (and usually is) interpreted differently depending on the provider, which can lead to unexpected results when switching providers.

About SQL functions, not all the functions you need are mapped to CLR methods, and not all providers offer a extensibility mechanism for mapping functions.

3). Finally, the performance issue. Converting expression trees to store queries can be expensive, and sometimes the end result is not the best possible query. The most elegant source code is not always the best runtime code.

-------------------------------------------------------------------------------------------------------------------

做个快乐的自己。
原文地址:https://www.cnblogs.com/Jessy/p/1861749.html