Language Integrated Query, LINQ, is a .NET Framework component used for native data querying
8
votes
2answers
953 views
LINQ to Sharepoint - Repository pattern and common methods in repositories
I generated a entity classes + data contexts by LINQ to Sharepoint and created a repository classes. When I use normal database and mapping like Entity framework I've got usually some base repository ...
5
votes
3answers
553 views
sharepoint caml is fast - how?
We all know that Caml is faster than using linq, since linq internally gets translated to caml.
But can anyone explain how caml is best to do sharepoint queries or how it is fast or what makes it ...
5
votes
2answers
363 views
Get CAML from LINQ to SharePoint
Is there an equilivant to GetCommand in LINQ to SharePoint? I know about ctx.Log, but I'm looking for something to retrieve the CAML from a LINQ statement without executing it.
5
votes
1answer
357 views
SPMetal and automated build approch
When using SPMetal to generate entity classes, these classes are used in LINQ to SharePoint queries.
We have a project with content type and list definitions and one project with business logic which ...
4
votes
3answers
2k views
CAML vs LINQ vs SQL
So
LINQ is a front end to CAML so of course CAML is faster, and CAML is a front end to SQL so of course SQL is faster.
However what would be a good test to see where and when to use each of these on ...
4
votes
2answers
407 views
Get all Files from sub folder of a certain content type
my problem is I have a document library with sub folders. Also the document library got more than one content type.
Is there a way to create a CAML or LINQ query to get all files of a certain content ...
4
votes
1answer
438 views
Visual web part - data binder issues
We have couple of lists in our application. Application types is a list which contains information about various applications - name, description and icon (as URL field with image format). Second one ...
4
votes
1answer
197 views
Get SPListItem from LINQ
I have used SPMetal to create a data context. I can query my lists. The queries return an object of the type of list that they are in. Is it possible to convert this type into a normal SPListItem ...
3
votes
3answers
4k views
Using LINQ to select SPListItems and load a SPGridView
Is there a way to run this LINQ statement
var items = from SPListItem li in listSettings.Items
where li["WebID"].ToString() == SPContext.Current.Web.ID.ToString()
orderby ...
3
votes
2answers
963 views
Frustrated! Linq to SharePoint, choice values, losing spaces
I'm using Linq to grab my SharePoint data (used CKS tools to create the class). I've been having some headaches with using it especially around choice fields. All of the choice values are converted ...
3
votes
1answer
552 views
Dynamic LINQ to SharePoint and Projection
How to build dynamic LINQ to SharePoint expression like this(but store "Bill", "Sam" in array):
// listing 1
// SPEntityModelDataContext generated with SPMetal
using (var db = new ...
2
votes
2answers
522 views
How to find a file with name = X in a SPList
Looking for recommendations. Have a file in a document library with name x.txt. In a workflow code behind, I need to get the file to read its contents. What is the best/most efficient way to do ...
2
votes
4answers
511 views
why doesn't SPMetal generate Publishing Schedule columns?
Happy 2011 experts,
I have a sharepoint 2010 publishing site that I use SPMetal to generate classes to. The problem is some fields do not get generated like:
PublishingStartDate and ...
2
votes
5answers
2k views
Quick and effective way to do an inner join using LINQ to Sharepoint on 2 tables
I can't seem to find a guide which explains how to do an inner join on lookup fields using LINQ. Most of the guides require converting the EntityLists to custom objects so you can join on non lookup ...
2
votes
2answers
640 views
Editing web.config file from a feature using linq
I have custom web.config functionality that uses Linq to merge elements into a web.config based on a template file. I would like to use this in a feature so I can get it to merge all web.configs in a ...