.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Kaviya Balasubramanian
Imran Ghani
Post New Web Links

LINQ 2 SharePoint: recursive queries

Posted By:      Posted Date: October 24, 2010    Points: 0   Category :SharePoint
 
Hi all,
is there a way to search items in a recursive way on a SharePoint 2010 list using LINQ?
For example, I have to search the last uploaded video in an Asset Library. This video can be uploaded on the root path or inside a folder. My query has to retrieve the last video uploaded, no matter if inside a folder or not.

This was possible with CAML: it was sufficient to set the scope attribute of a query to "Recursive". I am not able to do the same with LINQ.

Can anybody help me with this topic? Thanks.
Michele


View Complete Post


More Related Resource Links

Which tier do Linq queries belong?

  

Started in middle of a new project.  Our design architecture uses an n-tier (not MVC - no controllers) structure with Presentation, Data, Business and Service tiers.  However the lead analyst has the majoriety of code all in the Business tier claiming it all contains Business logic.  Our data tier is nothing more than a single .dbml model of the primary database to support all of the Linq queries in the Business tier.  To my mind Linq queries and classes they use are data access and belong in the data tier  but our lead analyst says they contain business logic therefore have to be in business layer.  


Data Points: LINQ Projection Queries and Alternatives in WCF Services

  

LINQ's ability to project randomly shaped data into anonymous types can be a blessing and a source of frustration, says Julie Lerman. It's great when you just need to grab a special view of your data, but it can be problematic in certain circumstances. She explains what the limitations are and how to get around them.

Julie Lerman

MSDN Magazine May 2010


Data Points: Precompiling LINQ Queries

  

Did you know that by precompiling LINQ queries you might actually be degrading your app's performance if you're not careful? Julie Lerman explains how to ensure you're not re-precompiling queries each time and losing the expected performance benefits across post-backs, short-lived service operations and other code where critical instances are going out of scope.

Julie Lerman

MSDN Magazine March 2010


Toolbox: Easy LINQ Queries, Becoming A Better Developer, And Logging Help

  

This month Toolbox provides help with error logging, finds an app that helps you write LINQ queries, and explores the non-technical side of development.

Scott Mitchell

MSDN Magazine September 2008


Parallel LINQ: Running Queries On Multi-Core Processors

  

Use Parallel Language Integrated Query (PLINQ) to take advantage of multi-processor computers and the newer wave of multi-core processors.

Joe Duffy and Ed Essey

MSDN Magazine October 2007


Time Difference in Linq queries

  

Hi All,

 

I have my Linq query in which i need to find time difference(not days difference).

The field in database is datetime.

Dim ldtToday As DateTime = TimeOfDay

Dim SR_RM_InnerJoin = From SR In lcntxRT60Entities.RtSReports _

Join RM In lcntxRT60Entities.RtRMaster On SR.RtRMaster.ReportID Equals RM.ReportID _

Select SR, RM _

Quick Note: Create Silverlight Graphs with SharePoint 2010 Data by Using LINQ

  
In this exercise, you will learn how to create Silverlight applications to retrieve SharePoint 2010 list data using LINQ.

Quick Note: Accessing Data in a SharePoint 2010 Web Part by using LINQ

  
In this exercise, you develop and deploy a visual Web Part that reads data from two lists by using a LINQ query and displays it in a DataGrid control.

Quick Note: Accessing Multiple SharePoint 2010 Lists by Using LINQ

  
In this exercise, you develop and deploy a visual Web Part that reads data from three lists by using LINQ queries and displays the results in a grid view control.

Video: LINQ to SharePoint 2010

  
This demonstration illustrates how to work with LINQ to SharePoint. (Length: 10:00)

Problem while retrieving data from a lookup column from sharepoint linq.

  
Hi I am working with sharepoint linq concept. When I am giving a query with lookup column It's working fine.  But when i am trying to retrieve the data from a look up column to spgridview. I was unable to get the output. Here is the above code which i have worked.   string strTitle = string.Empty; string strStatus=string.Empty; var context = new LinqSampleDataContext(SPContext.Current.Web.Url); EntityList<SharePoint2010ConceptsItem> Concept = context.GetList<SharePoint2010ConceptsItem>("SharePoint 2010 Concepts"); var query = from cs in Concept where cs.Status.Title.ToString()!="Completed" select new { cs.Title, cs.Id, //cs.Status }; sgvConcepts.DataSource =query; sgvConcepts.DataBind();   Any help me plz how to retrieve the data from a lockup column.bvnprasad

Problem with Retrieving data from lookup column using SharePoint 2010 Linq Concept

  
Hi I am working with sharepoint linq concept. When I am giving a query with lookup column It's working fine.  But when i am trying to retrieve the data from a look up column to spgridview. I was unable to get the output. Here is the above code which i have worked.   string strTitle = string.Empty; string strStatus=string.Empty; var context = new LinqSampleDataContext(SPContext.Current.Web.Url); EntityList<SharePoint2010ConceptsItem> Concept = context.GetList<SharePoint2010ConceptsItem>("SharePoint 2010 Concepts"); var query = from cs in Concept where cs.Status.Title.ToString()!="Completed" select new { cs.Title, cs.Id, //cs.Status }; sgvConcepts.DataSource =query; sgvConcepts.DataBind();   Any help me plz how to retrieve the data from a lockup column.bvnprasad

Sharepoint search 2010 related queries configuration

  
I am looking to enable the search related queries webpart for sharepoint 2010.  I am looking for instructions/documentation to configure this webpart.  Is there any out there?

Sharepoint 2010 queries on the new features

  
Hi,I am somehow evaluating the MOSS 2010 but got some queries on the new features, would anyone can help?1. Any anonymous submit/reply for blog or wiki or survey?2. Is it able to show the no of views per disucssion thread?3. Is there any page showing the survey result in a single page?4. Is MOSS 2010 link with the Outlook (2007) in term of the calendar and tasks5. Is the SEARCH function able to search within blog, wiki...Thanks!!Siu Wai

linq in sharepoint supports xml

  
May I know whether LINQ in SharePoint supports xml(process XML data) or not?  

Join linq queries with same field name

  
Hi everyone-I'm trying to join three Linq queries together.  One of the fields (rating) is the same name for each so when I add b.rating as you'll see below, I get a squiggly that says "Anonymous type member or property 'rating' is alread declared.   Dim customerCategoryA= (From a In dc.CategoryARatings _                                  Where a.userID = userID _                                  Select New With {a.productID, a.rating, a.ratingComment}) Dim customerCategoryB = (From b In dc.CategoryBRatings _                                 Where b.userID = userID _                                 Select New With {b.productID, b.rating}) Dim DataForGridview = From p In Products _   

Asynchronously Load LINQ Queries/Repeaters in Sections with Web Service

  

Hello,

I'm trying to  figure out the best way to load my main page faster.  What I'd like to do is have the bare bones of the master page display right away and on the Default.aspx Page_Load, call some web services that would query the rest of the items, in chunks, and then display.  I have 3 or 4 queries, which would be the chunks I am talking about. 

How would I accomplish this?  I tried putting Update Panels around the repeaters, but that didn't make the page show any faster, and the page still only displayed once all the data was queried.

I found this article, http://msdn.microsoft.com/en-us/library/2e08f6yc.aspx.  Could I call a web service and return a Linq Query and populate a Repeater on Default.aspx?  Would I need an Update Panel around the Repeater still?

I also found this article, which was very interesting in that it parsed and returned the actual HTML to plug into the page, http://encosia.com/2008/02/05/boost-aspnet-performance-with-deferred-content-loading/

I've been reading both of these for a while to try to understand which may be the best method to proceed with.  I'd really appreciate any a

Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend