LINQ to DataSet is a component of Language Integrated Query (LINQ) that provides SQL-style query capabilities against ADO.NET DataSet objects from .NET languages.
Questions tagged [linq-to-dataset]
181 questions
3
votes
2 answers
Using LINQ to filter on a variable number of parameters in c#
I have a DataSet with one DataTable and now I want a general way of checking if different LINQ queries returns any matches.
For example. Lets say i have a table that is called MyTable with the following data.
Col1 Col2 Col3 Col4
A1 B1 …

user3139545
- 6,882
- 13
- 44
- 87
3
votes
2 answers
Getting 404 Not Found in $batch of Odata
I am new to Odata.I have send multiple Post Request to Same Url.Then Getting exeption
"**http://localhost:25907/odata/$batch**"
Not Found Please any one help me how to handle this.
Thanks in advance.

Charnjeet Singh
- 3,056
- 6
- 35
- 65
3
votes
1 answer
How to do sum of a column with LINQ?
var GrandTotal = dt.AsEnumerable().Sum(cols => Convert.ToDecimal(cols.Field("TotalPrice")));
is Giving Error:
Unable to cast object of type 'System.Decimal' to type 'System.String'
How can I Correct it?

SRJ
- 198
- 1
- 4
- 22
3
votes
3 answers
select column from dataset using LINQ
I am absolutely new to linq query, please help with this query,
dataset has fields:
Name Value Client_owner.
I want to select Value if name == "searchtext"
DataTable results = (from d in…
user186702
3
votes
3 answers
AsEnumerable().Take
I want to take fist n number of records from a data table.
I don't want to run a loop which I already know.
I'm trying to do this
DataTable dt = dtResult.AsEnumerable().Take(n)
is the right way..?
what is the process to make this "n records" to be…

Jigar Shah
- 175
- 2
- 3
- 13
2
votes
2 answers
How to filter a DataTable by values not contained in an array?
If I have a DataTable userwidget, which has the following columns:
process_id, emp_num, widget_color
How to filter this DataTable using LINQ according to the following conditions:
1- WHERE emp_num = ...
2- AND process_id NOT IN (process)//process…

Anyname Donotcare
- 11,113
- 66
- 219
- 392
2
votes
2 answers
How to filter a collection using LINQ to DataSet
I'm working with a DataSet that contains two tables that I am trying to get data out of via LINQ.
I'm struggling with figuring out the syntax of how to return records that meet a condition.
Example:
Here are the two tables:
This query joins the…

Jed
- 10,649
- 19
- 81
- 125
2
votes
2 answers
LINQ to DataSet Group By Multiple Columns - Method Syntax
My question is identical to two previously asked questions
LINQ TO DataSet: Multiple group by on a data table, the only difference with this question is that I need to do that with Method Syntax.
and
LINQ Group By Multiple fields -Syntax help - the…

FMFF
- 1,652
- 4
- 32
- 62
2
votes
3 answers
Ordering a DataTable with Linq to DataSet using field substrings
I want to order a DataTable with Linq to DataSet using two ordering values. However the two values come from splitting and parsing the same field (don't ask me why!).
I tried to do this:
var query = from row in dtReports.AsEnumerable()
…

user1014769
- 23
- 1
- 4
2
votes
1 answer
LINQ and performance with typed and untyped datasets?
Has anybody had a chance to compare and measure performance of LINQ with typed and untyped datasets?
What are the internal implementation differences of these two. I know that LINQ-to-SQL uses expression trees to generate SQL from LINQ? Is there…

TheBoyan
- 6,802
- 3
- 45
- 61
2
votes
1 answer
How can I code numerous MIN functions into one LINQ to DataSet query
Ok, I've been working on this one for a while before asking for assistance. I have 4 Oracle based SQL queries which follow one another to deliver the requested data. I'm working in .NET and I think (I hope) I could use LINQ to DataSet to pass the…

Tony Dunsworth
- 25
- 5
2
votes
2 answers
LINQ to DataSet - Joins and GridView Issues
I've got three DataTables that I need to join together, and use the joined data as the DataSource for a GridView. The first (localSQLTable) is populated via a query against an MS-SQL database. The second two (serviceResponse.Tables(0) and…

Ian Pugsley
- 1,062
- 8
- 20
2
votes
1 answer
Query a DataSet using LINQ
I have a DataSet that I fill with a SQL select query. I then need to perform an extra query on this DataSet to filter the data some more, using LINQ to DataSet. I then want to hook this LINQ result up to some Data Control (Repeater or GridView) It…

Soeren
- 1,023
- 4
- 22
- 41
2
votes
1 answer
Selecting Multiple Rows from DataTable using Linq
I have a DataTable that has these columns:
AlertEmail , ClosingDate , OpeningDate , LocationTitle , JobTitle
I want to Search this DataTable and find Records for each AlertEmail. I do this but MailInfo returned NULL.
DataTable dt =…

Farzaneh Talebi
- 835
- 4
- 22
- 47
2
votes
1 answer
Improve Linq to Datatable Performance
I have a datatable with 500K rows in the following format;
Int | Decimal | String
We are using a singleton pattern and ultimately our DataTable needs ending up as a List(Of AssetAllocation) where AssetAllocation is:
Public Class AssetAllocation
…

Dooie
- 1,649
- 7
- 30
- 47