Language Integrated Query, LINQ, is a .NET Framework component used for native data querying
0
votes
1answer
30 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
27 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
31 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
69 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
18 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
95 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
46 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
25 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
55 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
223 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
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
330 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
204 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
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 ...
0
votes
1answer
180 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
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
297 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)
...
0
votes
1answer
350 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 ...
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
567 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
0answers
65 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
164 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
541 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
201 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 ...
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 ...
4
votes
1answer
195 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
0answers
100 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 ...
2
votes
0answers
285 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 ...
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
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
689 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
1answer
623 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
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
1answer
214 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 ...
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
2answers
943 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
2answers
141 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
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 ...
1
vote
1answer
294 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
367 views
Dynamic LINQ to SharePoint
This question starts here:
Dynamic LINQ to SharePoint and Projection
how to build dynamic LINQ to SharePoint expression like this(but store "Bill", "Sam" in array):
// Listing 1
// ...
3
votes
1answer
547 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 ...
1
vote
1answer
126 views
LINQ Query to obtain only the list names
How can I get only the lists present in a particular site?
I've tried the following one:
var listNames = from SPList list in web.Lists
where list.BaseTemplate !=
...
-1
votes
2answers
507 views
Using linq to get aggregated total of distinct values from csv items in datatable
I am going to use linq to get datapoints for chart created in sharepoint from datatable
this is datatable with 2 columns "task" and "users"
task users
task 1 john
task 2 mike, ...
1
vote
2answers
397 views
Can I use LINQ to lists in sharepoint online?
Can I use LINQ with lists in sharepoint online? If so, can someone provide me with an example?
0
votes
0answers
204 views
Linq Data Context - connect from web part as application pool identity
I have an assembly with linq to sql mappings and I'd like to utilize it in my webpart. But when I try following:
DataList dataList = new DataList();
dataList.DataSource = DB.Foo;
...
1
vote
1answer
96 views
What is the best way to access sharepoint lists?
In the past I tried with linq using spmetal, but after the project was almost finished I realized of some limitations, this tool does not generate fields for creation date, modified date, also it ...



