Language Integrated Query, LINQ, is a .NET Framework component used for native data querying

learn more… | top users | synonyms

1
vote
1answer
456 views

System.Data.Linq the given assembly name or code base was invalid

I have a webservice in my sharepoint site which uses System.Data.Linq to add some data to the database. If I make a call to this webservice, I get the following error: The given assembly name or ...
0
votes
1answer
16 views

Unable to return Microsoft.Sharepoint.Client.File object Names filtered by extension

I'm attempting to retrieve a set of File objects filtered by extension. The following code works correctly (without the filter). FolderCollection productModelFolders = ...
0
votes
0answers
18 views

Get specific value from XML document using xml.Linq

I have the following XML structure of a SharePoint field: <Field ID="{734289E8-016E-4190-8D99-B1B65F1841A4}" DisplayName="Country" Type="TaxonomyFieldTypeMulti" ...
0
votes
1answer
20 views

Document Library Attachment Retrieval. LINQ vs CAML

In a particular project I am required to retrieve corresponding attachments to a request submitted by a user. On one page the live requests are displayed with links to the attachments. The project ...
0
votes
0answers
13 views

Improve performance when querying huge lists

I have a query which will be joining 3 lists, 1 of which has 50,000 items. Hence, when query is executed the page takes >10 secs to load. This query is being executed in a custom Sharepoint webpart. ...
0
votes
1answer
602 views

linq query for lookup list column error - query uses unsupported elements

I'm trying to return the list item ID (s.ID), and the ID of a lookup column (s.VendorID). I get the following error: The query uses unsupported elements, such as references to more than one list, ...
-1
votes
1answer
119 views

ItemUpdated Event Receiver how to change element from one list to secound list

I have got two lists. I must do synchronize this list, but one have got only 3 columns, and secound list have got 3 columns too, but have got more columns with hidden value. I done synchronizing ...
0
votes
1answer
530 views

Problem with join two lists by linq

I wanna join two list and fill drop down list by specific column but i have error in join query note:c.user_id is lookup field my code lst.DataSource = (from c in dc.Complainant ...
2
votes
2answers
383 views

Security token service and custom claims provider - strange error

I have a custom claims provider, which uses some services from another assembly. This service assembly basically uses Linq-to-SQL context to read data from database which then custom claims provider ...
0
votes
3answers
2k views

Is it possible to have CAML Join without Lookup Columns?

I am new to SharePoint. I am developing a web-part in that I am trying to join two list. I have a same web-part in that lists were join using LINQ query. But it takes more time to fetch the data. So ...
0
votes
1answer
411 views

Why would linq to sharepoint ever return null list items?

I am getting a null reference exception that I can't pin down. By process of elimination using a variety of assumptions I've narrowed it down to a single variable, a linq iteration variable, like so: ...
0
votes
0answers
31 views

Simplest way to connect a Visual Studio SharePoint App to my external Database

Hi all new to developing for SharePoint. As the title indicates I want to connect my Visual Studio SharePoint App that I have created to my external database. I have created the app and it works in ...
1
vote
1answer
192 views

Use GroupBy on ListItemCollection using CSOM

I am trying to do a GroupBy on a bunch of items that I have retrieved using CSOM and when I try do a foreach loop to go through them I get method not supported exception. List contactsList = ...
0
votes
1answer
14 views

External Content type linq error

I have a list with an externa content type. I am tring to fetch the element by server side code, but i get this exception: Microsoft.BusinessData.Infrastructure.BdcException This is my ...
0
votes
1answer
39 views

Access parent site list data via LINQ from subsite

I have an SP 2010 web part that access list data using LINQ. The data and the web part currently live on the top-level site. Would I be able to easily access that data in a different web part from a ...
1
vote
0answers
354 views

LINQ DataSource DataContext: Could not load type

I made a very simple webpart with a grid view and and a LINQ to SQL data context object to surface some employee information for a phone list. I was able to databind the grid view directly to LINQ ...
0
votes
1answer
48 views

LINQ query taking long time

Following query i write it returns me 1400 records. and below line taking much time. 1.5 second taken by count = quer != null ? quer.Count() : 0; and 2 sec taken by candidateList = ...
0
votes
2answers
419 views

Linq to SharePoint 2013

Is it recommended to use Linq to SharePoint while developing projects for SharePoint 2013? or this became an old trend?
0
votes
2answers
4k views

Getting items from rows 4-8 in a Sharepoint list using CAML query?

Here is the code Im using to retrieve the first 4 most upcoming announcements from the OOTB announcements list in sharepoint: How do I modify this to retrieve the next 4 (5,6,7 and 8) most upcoming ...
5
votes
4answers
6k 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 ...
0
votes
4answers
2k views

OfType<SPListItem>() says SPListItemCollection does not contain a definition for OfType()

I'm using Linq to SharePoint rather than CAML to query list data from SharePoint. See the code I have written: SPList productsList = SPContext.Current.Web.Lists["Products"]; ...
0
votes
0answers
15 views

Filter MultiValueLookupFeild Using Linq

I have Following Linq which converts result set into list. i am getting perfect result but than i have to convert this list to datatable but it throws error that "XYZ" column already exist in ...
0
votes
0answers
51 views

Convert LINQ query to CAML

Please anybody help to convert below LINQ code to CAML:- var objPendingRequest = from reqHeader in objResourceAllocation.RequestHeader.ScopeToFolder("", true).ToList() join reqDetail in ...
0
votes
1answer
153 views

How to check sharepoint list date column is empty?

How to check sharepoint list date column is empty? I want to check in back end code. IEnumerable<DataRow> x = from laptop in dtList.AsEnumerable() join ...
0
votes
0answers
173 views

dataservicequeryexception is unhandled by usercode

var serviceUrl = "/_vti_bin/listdata.svc"; var context = new listservice.TestingEnvironmentDataContext(new Uri(serviceUrl)); context.Credentials = System.Net.CredentialCache.DefaultCredentials; var ...
0
votes
2answers
184 views

Linq get Distinct or first from multiple group

Ok, I'm not understanding something here with what I am attempting to query here. I have a list like the following. Title Subject Content Date ...
1
vote
2answers
406 views

Exists / Count in client object model

What's a good way to perform an Exists or Count on the client object model classes? I have list with views. I want to check if a view already exists before creating it. Tried a couple of things, but ...
1
vote
0answers
1k views

An item with the same key has already been added when trying to recover my list using Linq (SPMetal)

I have a problem with my application SharePoint. The problem is that I added a List in my SharePoint site (directly in SharePoint), then I used SPMetal LINQ to generate a File in which I can recover ...
1
vote
1answer
292 views

Linq to sharepoint: Cannot find corresponding storage member

I'm trying to use Linq to Sharepoint to get a list and i got this message: Cannot find corresponding storage member for member Title I've tried some solution but nothing worked. And i don't ...
1
vote
0answers
25 views

LINQ to SP Problem

I have a following var resultsMarks = from mItem in MItemList.ToList() select new { ScienceGroup = mItem.ScienceGroup, ArtsGroup = mItem.ArtsGroup, CommerceGroup = mItem.CommerceGroup, ...
1
vote
1answer
292 views

Will searching SPWebApplication.Sites with Linq need to be diposed?

Situation: I only have the full URL of an image in our farm & no knowledge of where it comes from other than being in the web application so I need to locate the site/web/list/item segments. ...
6
votes
2answers
9k 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 ...
0
votes
1answer
133 views

LINQ in SharePoint to order listitems

I have tried the following in CAML but it does not seem to be returning them sorted SPQuery query = new SPQuery(); query.Query = "<Query><OrderBy><FieldRef Name='Sequence ...
0
votes
3answers
1k views

Access Denied opening a list from another site collection

I am trying to access a list via LINQ to SharePoint that is part of a different site collection. I am able to create the DataContext object for the other site but when I try to access the ...
0
votes
1answer
246 views

get count from groupby query of linq to xml

I need to group the elements in the xml by Article_x0020_Tags . Here I get the items from the sharepoint pages library , which has a custom column called "article Tags" which is a managed metadata ...
1
vote
1answer
621 views

Is it possible in LINQ to SharePoint

I have a task to make a WSP, which should provide definitions of custom list and library, but not instances. List definition has a lookup column to library item <Field ...
0
votes
1answer
48 views

Shortcut to use LINQ

http://msdn.microsoft.com/en-us/library/ff742311.aspx Based on the link above you have to make a detour before you can use syntax code LINQ for SharePoint. If you have to do the same approach for ...
0
votes
1answer
109 views

How to get list items same values in each two list items to display in 3rd list using with caml query

How can I write one caml query to get items from two lists joined on empid? will you please anybody give me help with suitable caml query or even otherwise possible code. Note: There is no lookup ...
0
votes
1answer
151 views

get list item versions in linq to sharepoint

How can i access last approved list-items in linq to sharepoint. Actually I want equivalent of this statement in linq to sharepoint if (item.Versions[index].Level == SPFileLevel.Published)
0
votes
0answers
471 views

Values missing for dependent lookup column from parent list when using linq

Situation I have 2 site content types defined that are deployed as a site feature: Customer Name Address Order Value There is a second web feature that deploys a list to the root site for ...
1
vote
0answers
275 views

Linq to Sharepoint throws System.IndexOutOfRangeException

I have used entity class generated from SPMetal to retrieve data from sharepoint list. Frequently I am getting the below error on the sharepoint page and not able to do anything in the site. This ...
0
votes
1answer
46 views

Linq & SharePoint 2007

Morning all, I'm aware that LINQ was packaged with SharePoint 2010 but I'm wondering on the feasability of tools such as Linqpad with SharePoint 2007. I've recently inherited a SharePoint 2007 farm ...
2
votes
1answer
473 views

merge two lists with WCF Services and Linq

How do I merge two lists when using REST services? You can't use union with linq and dataservicequery so I'm not sure where to go. The following doesn't work with dataservicequery... var docQuery = ...
1
vote
0answers
75 views

LINQPad cannot connect to remote Sharepoint machine

I have been working with the SP2010 OData interface to get some quick and dirty sheets as required by colleagues. Now I need to use some additional methods (f.e.:GroubBy) and therefore need to use ...
3
votes
2answers
163 views

Sharepoint 2013 Dispose in linq

I'm wondering if this needs to be disposed or if it's a bad method to get the title of a web. var currentWebApp = SPContext.Current.Site.WebApplication; IEnumerable<SPSite> allTeamSites = ...
0
votes
2answers
223 views

how to update Listdata with Linqpad and wcf?

I am a lazy person, therefor I like to not scratch up a small concsole application if I don't need to. I'd like to update a few listitems via Linqpad. I can query the items just fine, but how do I ...
1
vote
1answer
2k views

How to get results from listdata.svc from a certain folder

I'm looking to get a certain set of data from my list using the listdata.svc service with AJAX. The problem is inside the list I have folders, and I'd like to only receive elements inside a certain ...
3
votes
2answers
2k 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 ...
0
votes
1answer
277 views

Is SPMetal and LINQ to SharePoint worth using?

I have recently run into a number of issues with SPMetal and LINQ to SharePoint that is making me wonder if it is worth it. In what cases does it make sense to use SPMetal and in what cases does it ...
3
votes
1answer
410 views

SPMetal parameter file and oob fields like created, modified, etc. not created

I'm using CKSDev spmetal generator. I have set up the following parameter file : <Web xmlns="http://schemas.microsoft.com/SharePoint/2009/spmetal" Class="ModelContext"> <ContentType ...