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

learn more… | top users | synonyms

0
votes
1answer
19 views

SharePoint Linq ToList ArgoumentException

I'm using SharePoint 2010 Foundation with LINQ for SharePoint list. I've generate my DataContext using spmetal command. Now I'm trying to access data but I have this error: ArgoumentException ...
0
votes
1answer
47 views

Loading list items with CSOM ClientContext.Load: performance with LINQ

We have code like this: List list = clientContext.Web.Lists.GetByTitle("TestLib"); ListItemCollection items = list.GetItems(query); clientContext.Load(items, its => ...
0
votes
1answer
50 views

How to join two sharepoint list data using CAML or LINQ?

I have two lists: Doctors DoctorDetails In list #2 I have a lookup from list #1 i.e. on Doctor Name. Now I want to fetch data on the basis of doctor name as filter from both lists. How can I ...
1
vote
2answers
140 views

Create a dynamic WHERE clause with LINQ to SharePoint

I have a custom application where the user can select multiple (13) parameters to select data from a SharePoint list. To achieve this, I want to use LINQ to query this data from SharePoint. The ...
1
vote
0answers
35 views

SPMetal Error : An item with the same key has already been added

I am using the following command to generate entity class for Linq to SharePoint. spmetal.exe /web:http://mywebname:port /code:D:\CustomerClass.cs I am getting Error "An item with the same key has ...
0
votes
1answer
96 views

Using DataBase First Approach with EF in SharePoint?

I have seen here and there that Entity framework and Linq works with SharePoint. But can we use Entity framework Database first approach in SharePoint? ...
0
votes
0answers
30 views

SPMetal - Specified cast is not valid

Here is the code : using (Entity_HoursReconDataContext context = new Entity_HoursReconDataContext("url")) { EntityList<HoursTrackingItem> Hours = ...
0
votes
1answer
80 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
26 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
37 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
23 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. ...
-1
votes
1answer
635 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
0answers
60 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
417 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
15 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
52 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 ...
0
votes
1answer
67 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
1k 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
1answer
227 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
232 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
346 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 ...
0
votes
4answers
3k 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"]; ...
1
vote
0answers
505 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 ...
1
vote
2answers
370 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
26 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
425 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. ...
0
votes
1answer
224 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
1answer
51 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
123 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
192 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
1answer
319 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 ...
0
votes
1answer
762 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, ...
0
votes
0answers
590 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
322 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
53 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 ...
1
vote
0answers
84 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
175 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
1answer
476 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
2answers
299 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 ...
0
votes
1answer
310 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 ...
0
votes
1answer
586 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 ...
0
votes
1answer
71 views

Understanding SPMetal and Linq

If I generate .cs file using SPMetal for my site and then use it in Visual Studio to develop web part using Linq. And later on I create a new list in my site, will I need to generate .cs file again?
1
vote
1answer
769 views

Join multiple lists using XML web service

Implement a new XML web service, in the web service, use the SharePoint API to merge or join two or more list. Then, in SSRS, retrieve data from the XML web service using XML data source type. ...
0
votes
1answer
79 views

DirectoryNotFoundException when trying to read Picture Library using Linq

I am trying to read a picture library named "ImageLibrary" as follows: SPList list = web.GetList("ImageLibrary"); But I am getting following error: DirectoryNotFoundException How do I read ...
0
votes
3answers
5k views

Better way to get a SPListItem by Field

I want to get a SPListItem from a SPList where a field match a value. I have to ways to do it, CAML and LINQ. My code is: LINQ ... SPList list = Web.Lists["MyList"]; SPListItem item = (from ...
1
vote
1answer
274 views

SharePoint, LINQ & Reporting Services Tools

I'm new to SP and SSRS, so I want to check if my thoughts are correct. Report Builder and BIDS suck on data retrieval so I have to go deeper using code. Is it possible to write some code in C# using ...
0
votes
2answers
535 views

Looking for fast way to get Listitem Count

My problem ist related to this question. In order to get the basic statistics I need the total item count. However the basic LINQ query (from t in Tickets select t).Count(); or Tickets.Count(); ...
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 ...
1
vote
0answers
43 views

Linq query multiple master tables

I have a question related to LINQ queries in SharePoint 2010. I have few master lists - 1> Team (ID, Name) 2> Lifecycle (ID, Name) 3> Technology (ID, Name) 4> Users (ID, Name) Then there is a mapping ...
6
votes
2answers
11k 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 ...