Language Integrated Query, LINQ, is a .NET Framework component used for native data querying
2
votes
1answer
313 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 = ...
3
votes
2answers
952 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
630 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 ...
0
votes
1answer
33 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
352 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
28 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
...
1
vote
1answer
135 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 ...
1
vote
1answer
299 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
32 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?
0
votes
1answer
74 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
19 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
113 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 ...
2
votes
3answers
1k views
Getting “Access denied” error message when trying to access a SharePoint list via Linq from an Web Service
I have following scenario.
A web service hosted on IIS 7 should take messages from a MSMQ, transform them and put them into a custom SharePoint list.
The list, contenttype and columns were defined ...
0
votes
3answers
253 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
1answer
49 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
0answers
26 views
Perform Linq query, then add results to a list
I have a problem which is bogging me for days and I can't seem to fix it. I currently have 2 lists - "Job Positions" and "Applicants". I want to perform a table join where job position titles = ...
0
votes
2answers
59 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
0answers
15 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 ...
4
votes
2answers
362 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
2answers
222 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
182 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
0answers
64 views
sharepoint 2010 linq query Assigned to column of list
i need to query using linq to assign to (person or group type column) i have generated my context class using SPMetal.
any code example or url wil be appreciated.
i need to know in context of ...
4
votes
1answer
196 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 ...
0
votes
1answer
117 views
How to iterage through Message content type in Discussion list
I need to iterate through all the columns (default + custom) in Message content type in Discussion list.
i have used this code:
//select a single discussion (in this case, the first one), to view ...
0
votes
1answer
1k views
Linq: How to use EntityLists to do a join on a lookup field?
I have 2 lists, one list contains a lookup to another.
I have used SPMetal to generate entity.cs based on this article: ...
0
votes
0answers
25 views
LinqToSP crash with a user without owner privileges
I have this piece of code:
using (SPSite site = DetectContextSite())
{
using (SPWeb web = site.OpenWeb())
{
using (var dc = new ...
1
vote
0answers
163 views
My List Content Type is no being found by SPMetal
I am trying to use Linq to Sharepoint for some custom reports but I am running into an issue trying to setup SPMetal.
I generated the class but for one of my lists "ListA" only ID and Title fields ...
0
votes
0answers
298 views
Caml Joins for multiple lists
I have four lists as explained below
EmpMaster ( Empcode, EmpName, BranchCode )
BranchMaster ( BranchCode, BranchName, BranchHead, ZoneCode)
ZoneMaster ( ZoneCode, ZoneName, ZonalHead)
...
4
votes
2answers
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 ...
1
vote
1answer
569 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 ...
1
vote
0answers
48 views
Is there a visual building tool to generate LINQ Queries? [closed]
Is there a visual building tool to generate LINQ Queries (from sharepoint lists) similar to CAML's U2U builder or CAML Designer?
Thanks
0
votes
2answers
142 views
Delete item from COM. Don't find Item
I'm trying to delete but the code seems that can't find the Item field :
try
{
using (ClientContext context = new ClientContext("http://to0wss2k10rey03/sites/ReplyCorp"))
...
0
votes
0answers
66 views
edit which data is rendered with google Chart through EditorPart
I am using the GoogleChart API to render some charts .
To do this, I am executing a LINQ Query which looks similar to this:
var dataList = from products in entities.Productlist
select ...
0
votes
1answer
165 views
How to access Yes/No field of Sharepoint List using Linq?
I have one list in which there is field with the datatype of Yes/No. I am trying to retrieve data of that field but it is giving me following error :
System.InvalidCastException: Specified cast is ...
0
votes
1answer
1k 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
3answers
544 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 ...
0
votes
1answer
202 views
How to do Scope=RecursiveAll with Linq To Sharepoit
I have the following CAML query:
caml = string.Format("{0}", code);
query = new SPQuery { Query = caml, ViewAttributes = "Scope = \"RecursiveAll\"" };
This query search in a document library a list ...
2
votes
0answers
286 views
Reverse lookup with Linq to SharePoint
I have two lists called ‘Events’ (custom list) and ‘Timeslots’ (calendar list), Timeslots has a lookup in to the id column of Events. Each event can have multiple timeslots.
I need to show columns ...
0
votes
0answers
102 views
Create External Content Type with Linq query
I have the following issue. I created BDC Model in VS 2010 to which i added Linq to SQL model(that has two tables in it). No I'm wondering can i create entity (class) that is represented in sharepoint ...
1
vote
1answer
247 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
1answer
692 views
Lookup field Join not working
I am new to sharepoint and i am using Linq to Sharepoint in my project.
I have two Lists in TestSite.
Details are as below
Department
DepartmentName Single line of text
ManagerId Person or ...
0
votes
2answers
258 views
LINQ to SharePoint and SPUserToken
When creating a new Linq to SharePoint context, normally we don't pass a site object but we provide a request url.
So what should I do if I want to execute Linq queries under a different user ...
0
votes
1answer
117 views
linq to sharepoint and excessive cpu usage issue
our project is using linq to sharepoint , its working well the only problem we are facing is the extra CPU usage its taking , even if only two or three users concurrently accesses the local testing ...
0
votes
2answers
944 views
Get Files from document library with LINQ
Hi I'm trying to get file from a documentLibray with LINQ Query.
I've been trying with this code but I get nothing!
var allegatiCollegati = (from SPFile attach in web.Lists.["Allegati"].items
...
0
votes
1answer
215 views
EntityList empty when querying items provisioned in List Instance XML
I'm not sure if I have found a bug here or if I'm doing something wrong.
I have a list which I provision using a SPI in Visual Studio, in the List Instance XML I provision some default list items ...
0
votes
2answers
323 views
How can i access sharepoint using LINQ instead of CAML?
is there any way to access Sharepoint lists via LINQ instead of CaML?
1
vote
0answers
136 views
Generating Entity List property for “Reusable Content” list
I am attempting to generate an entity class for "Reusable Content" list. After running the CKSDEV tool, i see that DataContext object has the following
/// <summary>
/// Items in this list ...
0
votes
2answers
82 views
How to use values from 2 item collections?
I'm trying to use values from 2 SPListItemCollections, as one of them have a lookup field with values from the other list.
The reason why I need to do this, is because I need the value from the other ...
0
votes
1answer
60 views
Get client query of a server query
I?m trying to get
how can I get the query but on the client context?
SPWeb webRoot = scSite.OpenWeb();
SPListItem selectedItem = (from SPListItem item in ...
4
votes
1answer
434 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 ...




