Questions tagged [asenumerable]
32 questions
0
votes
1 answer
How to change the format from DataTable and Show in DataGridView in vb.net
How to change the format of DataTable and Show in DataGridView in vb.net?.
I want to change the format of the DataTable without going through the DataGridView format and displaying in the DataGriView. Please recommend the best solution.
I tried but…

roy
- 693
- 2
- 11
0
votes
1 answer
vb.net datatable asenumerble get distinct vlues and count grouped duplicate rows
I have a datatable called dtDealer with 2 columns called Customer, Year. I am trying to make a new datatable called dtdistinct which has an extra column called multi which shows the count for the number of duplicate rows...
dtDealer
Customer |…

Mr.BlackBolt
- 1
- 2
0
votes
1 answer
How to apply skip and take in Datatable Asp.net Core 2.0
Is there any way to apply skip and take in Datatable in asp.net core 2.0. without converting to any class type?
I have used stored procedure to get data and convert to Datatable, I want to apply pagination in this Table, how can I do this?

Jiju John
- 821
- 3
- 14
- 35
0
votes
1 answer
How to get distinct values from data table?
I am trying to return an `array with distinct records. But this piece of code isn’t working. What am I doing wrong?
return table.AsEnumerable().Distinct(DataRowComparer.Default).ToArray();
0
votes
0 answers
C# DataTable AsEnumerable throwing KeyNotFoundException: is this a missing row or column or something else?
I have a problem iterating over a big DataTable (300k rows). Unfortunately, the problem isn't reproducible on demand, so I don't know how to solve it. Minimal code that should demonstrate the issue, under the right conditions:
var data =…

user3450049
- 825
- 1
- 10
- 20
0
votes
1 answer
Split DataTable without using AsEnumerable()
I am writing a C# script that will be run inside another project that makes use of the C# compiler. This engine does not have System.Data.DataSetExtensions referenced nor will it be allowed to do so.
That being said I still need to take a DataTable…

webworm
- 10,587
- 33
- 120
- 217
0
votes
0 answers
AsEnumerable returns value, filter options does not
AsEnumerable returns a value but without it returns not a value.
I seem to have an issue with extracting a certain value from my odataQueryservice.
ODataQueryService ax = new ODataQueryService(new Uri(Link));
double test =…

famle
- 471
- 2
- 6
- 10
0
votes
0 answers
How to get as result of a query the index of the rows based on the condition statement in LINQ C#
DataTable mdt = dt.AsEnumerable().GroupBy(r = >new {
Col1 = r.Field < string > ("Parent Part Number"),
Col2 = r.Field < string > ("Child#1 Part Number")
}).Select(g = >g.OrderBy(r = >r.Field < string > ("Parent Part…

Antonio
- 87
- 8
0
votes
1 answer
LINQ object of IEnumerable type does not return a DataTable
Could someone briefly me explain why the I cannot use the CopyToDataTable method on the following linq object (of IEnumurable type)?
var query = from r in SourceData.AsEnumerable()
group r by r["fruitid"] into Dt
select new
…

dark.vador
- 619
- 1
- 6
- 25
0
votes
1 answer
how can I know what T-SQ is executed?
I have this:
List lstPersonal = dbContext.Personal.Select(x => new
{
IDPersonal = x.IDPersonal,
Nombre = x.Nombre
}).AsEnumerable().Select(x => new…

Álvaro García
- 18,114
- 30
- 102
- 193
0
votes
1 answer
LINQ "Method Join Not Supported" gone when put "AsEnumerable"
I've a WCF which query data from data entities.
I'm kind of confuse why it's complain "Method Join Not Supported" if the syntax did not put "AsEnumerable", and it there a way not using AsEnumerable. Because i read some article mentioned it will put…

tsohtan
- 830
- 1
- 13
- 33
0
votes
1 answer
AsEnumerable with stored procedure using Entity Framework
I am new in using stored procedure using Microsoft Entity Framework. To do some practice I used Northwind database and I was successfully able to do something like this:
var qry = (from row in dbContext.CustOrderHist("custID").AsEnumerable()
…

Akif Tariq
- 71
- 1
- 9
-1
votes
1 answer
Conversion between IEnumerable EnumerableRowCollection
I have the following code:
var aaData = myapi.GetData().AsEnumerable().Select(x => new {
Id = x["myID"],
Desc = x["myDesc"]
});
Trying to do the following
aaData =…

N. Kaufman
- 81
- 1
- 2
- 9
-1
votes
2 answers
converting a SQL statement to LINQ query on a DataTable
I am studying that Linq to DataTable,Lambda.
Because is difficult want to change sql to linq,Lambda, is not doing.
Below the SQL code is member list that remove telephone number repetition.
I will thank if help.
SELECT A.no, B.name, B.userId,…

smileBird
- 19
- 1
- 3
-1
votes
3 answers
How can I populate a generic list of string with the results from a single-column DataTable?
I see a lot of complex examples for converting a DataTable with multiple-member rows here but in my case, the query simply returns one column from a table, that is to say 0..N strings/varchars, such…

B. Clay Shannon-B. Crow Raven
- 8,547
- 144
- 472
- 862