LinQ to SharePoint 2010 Limitations and Advantages

LinQ to Sharepoint 2010 Limitations and Advantages :-


Advantages:
1. Ease of Use: Might not be the case for Developer with SP 2007 experience.
1.Easier to do code review when code is written in LinQ.
2. Enforces View Fields.
3. Encourages Row Limit.
4. Ease of complex scenarios like IN clause.
5. Type Safe: Chances of error due to typo errors is lesser which essentially saves developer time if same entity is used multiple times.
6.Advantage or Disadvantage: Always adds a Content Type Where Clause.

Disadvantages:
1. Does not support connecting from one Site Collection to another. Only alternative is to set httpcontext to null. But in that case I will personally prefer to do it in CAML.
2. Can result in two stage query without the developer realizing it.
3. Only limited operations are supported, and in case of any other used, that operation is calculated in Memory.
4. Cannot fire a SiteDataQuery from LinQ.
5. Managed Meta Data Columns are not supported in LinQ.
6. Does not generate classes for many fields and field types.
7. Entity is generated for Content Types, it can be attractive to have the full content type view fields.
8. Predicate Builder is missing/inadequate for Dynamic queries.
9. Impersonation cannot be achieved using LinQ and Elevation can be achieved only by setting httpcontext as null.
The list continues.... CRUX: Except for the points 1, 4, 5, 8, Entity Model/LinQ to Sharepoint is a good feature but like all advanced features, we need to take extra precautions to make sure we make proper and appropriate usage of this feature. Most performance related issues come from Two State Queries and In Memory scenarios and not due to LinQ to CAML conversion by MS Managed Code. Believe me, I have seen that a hundred number of times. Best of Luck using it!!!
Share on Google Plus

About JK STACK

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.

1 comments:

  1. Hey ,

    I ma looking for the same. it is quite interesting.

    ReplyDelete